WordPress API returning “That API call is not allowed for this account” error
-
Hello. First-time poster. Could anyone please give me some direction as to why the first API request works but the second returns a “That API call is not allowed for this account” error? Other than “sites” at the end, they are identical in terms of method, access token, etc.
This one Works :)
https://public-api.wordpress.com/rest/v1/me/?access_token=thisIsMyValidAccessToken
This one doesn’t work :(
https://public-api.wordpress.com/rest/v1/me/sites/?access_token=thisIsMyValidAccessToken
Both queries work here: https://developer.wordpress.com/docs/api/console/
I’ve spent days on this. Any suggestions would be wonderful.
EDIT: This is the OAUTH request I’m making to grab the token, and it still doesn’t work.
https://public-api.wordpress.com/oauth2/authorize
Thanks.
-
Howdy!
Here’s the reply from our api team:
Since the
/me/sitesendpoint lists multiple sites, it requires a globally scoped OAuth token, rather than a token scoped to a single site. See our OAuth2 Authentication documentation for more info, specifically thescopeparameter: https://developer.wordpress.com/docs/oauth2/
- The topic ‘WordPress API returning “That API call is not allowed for this account” error’ is closed to new replies.