 Kevin Pinto
|
January 1, 2021 at 7:02 pm
I have defined a custom field named OnlineURL for an event as shown in the picture.

How do I obtain this using the API? I am able to get many Event fields, but cannot figure out where this field value is stored.
|
 Kevin Pinto
|
January 1, 2021 at 7:03 pm
Link to the image is here
|
 Tony
|
January 4, 2021 at 5:09 am
Hi there,
Which API are you referring to? REST API?
If so you’ll need to send an authenticated request to:
/wp-json/ee/v4.8.36/events/{event_id}/post_metas
Is that what you are looking for?
|
 Kevin Pinto
|
January 10, 2021 at 6:58 pm
Yes, the REST API.
Is there an easy guide to REST API authentication?
|
 Tony
|
January 11, 2021 at 7:48 am
Using PHP?
You send an additional ‘Authorization’ with the username:password base64 encoded like so:
'Authorization' => 'Basic ' . base64_encode( 'username:password' )
There some details here:
https://code.tutsplus.com/tutorials/wp-rest-api-setting-up-and-using-basic-authentication–cms-24762
|