I need to update a 'last_viewed' field via REST and am following the convention of /wp/v2/category_sponsor/1141 then passing in a JSON data packet like:
{ "meta_box": { "last_viewed" : "current date/time"}}
But I am getting a response from the server of:
{
"code": "rest_cannot_edit",
"message": "Sorry, you are not allowed to edit this post.",
"data": {
"status": 401
}
}
I am not going to include login authentication info because this is in JavaScript in the client browser, so is there a setting I can change to allow non-authenticated CPT updates via REST API?
I had my own API for this before I moved to MB, so I wanted to do it the MB way. If it's not possible, I can go back to using my own code for posting back.
Thanks,
jim