Webmaster API User does not have sufficient permission for the site

I am using google-api-php-client library to access webmaster tool data. When I wanted to list the Sitemaps, Fatal error appeared: Uncaught exception 'Google_Service_Exception' (403) The user does not have sufficient permission for the site. See also: https://support.google.com/webmasters/answer/2451999 . 'I am adding the email address of the service account as a limited user for my site, but the error still exists.

Finally, I find the answer: The service account is not like a regular Google account. You cannot use it to access certain resources , even if you indicated "access" to that specific address. See here for different ways to authorize your requests in the webmasters API.

+5
source share
1 answer

The service account is not like a regular Google account. You cannot use it to access certain resources, even if you indicated "access" to that specific address.

You need to manage the permissions of the service through the Webmaster Administrator . Add your service account

whatever@developer.gserviceaccount.com

there is.

+1
source

Source: https://habr.com/ru/post/1211676/


All Articles