I'm trying to retrieve custom fields from a post on our website - we have REST API configured, and I understand that to retrieve custom fields with REST, we have to access the page in edit mode. However, the following curl request:
Consistently returns the following, even though I have the Basic Auth plugin installed:
[{"code":"json_cannot_edit","message":"Sorry, you cannot edit this post"}]
The request works fine if I don't include ?context=edit. I'm not sure how to proceed in debugging this. (For further context, we're also using Advanced Custom Fields - I'm not sure if this affects our ability to use this plugin or not.
I'm trying to retrieve custom fields from a post on our website - we have REST API configured, and I understand that to retrieve custom fields with REST, we have to access the page in edit mode. However, the following curl request:
curl -u "myuserid:mypassword" http://www.mywebsite.com/wp-json/posts/67?context=edit
Consistently returns the following, even though I have the Basic Auth plugin installed:
[{"code":"json_cannot_edit","message":"Sorry, you cannot edit this post"}]
The request works fine if I don't include
?context=edit
. I'm not sure how to proceed in debugging this. (For further context, we're also using Advanced Custom Fields - I'm not sure if this affects our ability to use this plugin or not.