Authorize API key
-
I need to call wordpress endpoints from outside without basic auth. So I used api key for that. I defined my api key inside the config file. I am able to get main user details by calling the below endpoint.
https://mysite.com/wp-json/wp/v2/users/1
But I am getting a n error while calling for another user as follows
https://mysite.com/wp-json/wp/v2/users/2
Error:
‘code’: ‘rest_user_cannot_view’,
‘message’: ‘Sorry, you are not allowed to list users.’,
‘data’: {
‘status’: 401
}
How I can authorize the API key for all users? Please help -
Hi there!
What’s the address of the site you’re working on?
Please note that these forums are for WordPress.com-hosted sites only. If your site is using the open-source WordPress.org software, we won’t be able to help you out, and you’ll want to seek help at these forums:
- The topic ‘Authorize API key’ is closed to new replies.