Export to GitHub

google-api-python-client - issue #347

403 error when try to query searchanalytics on my site


Posted on Jul 29, 2015 by Massive Dog

[Use this form for both apiclient and oauth2client issues]

What steps will reproduce the problem? 1. Authorize via oAuth2 2. Tried to query: x = gapi.webmasters_service.searchanalytics().query(body={"startDate": "2014-01-01", "endDate": "2014-01-01"}, siteUrl="http://seozeo.com.tr").execute()

What is the expected output? What do you see instead?

Gets 403 error: HttpError: <HttpError 403 when requesting https://www.googleapis.com/webmasters/v3/sites/http%3A%2F%2Fseozeo.com.tr/searchAnalytics/query?alt=json returned "User does not have sufficient permission for site 'http://seozeo.com.tr/'. See also: https://support.google.com/webmasters/answer/2451999."> But this is site I've created.

What version of the product are you using? On what operating system?

Ubuntu 14.04 x64, python 2.7, pip freeze: cffi==1.1.2 cryptography==0.9.3 enum34==1.0.4 gdata==2.0.18 google-api-python-client==1.4.1 gspread==0.2.5 httplib2==0.9.1 idna==2.0 ipaddress==1.0.14 oauth2client==1.4.12 pyasn1==0.1.8 pyasn1-modules==0.0.6 pycparser==2.14 pyOpenSSL==0.15.1 rsa==3.1.4 simplejson==3.8.0 six==1.9.0 uritemplate==0.6

Status: New

Labels:
Type-Defect Priority-Medium