Mani Kanta
Mani Kanta

Reputation: 31

Web Master Tools API Search Analytics Ver 3

I am using Google Web master tools API v3 for Search Analytics. I am using Service Account to retrieve the analytics. I received following message.

(403) User does not have sufficient permission for site 'http://www.1800medexpress.com/'. See also: https://support.google.com/webmasters/answer/2451999.'

I added Service Account Email address also to the Web Master tools as owner. But still received same error.

I used PHP API Library.

Upvotes: 1

Views: 241

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 117254

I haven't tried but this should work.

In Webmaster tools for the website in question. upper right hand corner there is a cogwheel click on it go to Users and Property Owners click add a new user button add your service account email address.

Then try and run your code.

Service accounts need to be granted access to the data just like you would any other user by default they don't have access to your data.

Update:

By checking the documentation we can see that it is in fact possible to use a Service account with webmaster tools api it just needs to be set up properly. It may be an issue with your code or how you have set it up. Clod should probably be simlar to this. Service account with Google Calendar

A service account is used in an application that calls APIs on behalf of an application that does not access user information. This type of application needs to prove its own identity, but it does not need a user to authorize requests. The Google Accounts documentation contains more details about service accounts.

Upvotes: 1

Related Questions