0

I'm using WP Rest API plugin to use Wordpress as backend of iOS app. I need to update the username using the following endpoint

http://......com/wp-json/wp/v2/users/1?context=edit

And this is the response I got.

{
  "code": "rest_cannot_edit",
  "message": "Sorry, you are not allowed to edit resource.",
  "data": {
    "status": 401
  }
}

It seems that the Rest API plugin does not support user profile update, or am I missing some authentication parameters?

Thanks in advance, looking forward the best solution.

0

I found the answer from below.

https://developer.wordpress.org/rest-api/using-the-rest-api/authentication/

Authentication is the primary step for all API works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.