1

I am trying to get data from GSC Search Analytics API using Python. I have been following this guide, but no matter how many times I tried to change something I keep getting this error:

 raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: <HttpError 403 when requesting https://www.googleapis.com/webmasters/v3/sites/http%3A%2F%2Fwww.example.com/searchAnalytics/query?alt=json returned "User does not have sufficient permission for
site 'http://www.example.com/'. See also: https://support.google.co
m/webmasters/answer/2451999.">

I gave full permission to the email address generated in for the service account in Google developers console user permission screenshot

I do get Google Analytics report retrieved with all the data, but google search console report is empty due to this permission issue.

What am I doing wrong?

hgdrive
  • 11
  • 3
  • Pass the domain URL of which you have access. Not www.example.com – dikesh Jan 13 '16 at 04:57
  • I have tried these 2 so far, but I have 30 more sites under same GSC and GA accounts: http://www.humberviewmotorsports.com/ http://www.woodstockhyundai.com/ – hgdrive Jan 13 '16 at 14:18

1 Answers1

2

For those who do not know, as it is said here, passing your website URL in your query matters.

The URL of the property to add. Examples: http://www.example.com/ (for a URL-prefix property) or sc-domain:example.com (for a Domain property)

Sajjad Mortazavi
  • 190
  • 2
  • 12