Hi,
I'm sorry for the question but I have read lot of forums and comments but I have not get the answer.
I have created a basic code that should response a number of the visits, but I always get the same answer.
Both in my app and in OAuth 2.0 Playground.
The response is: error=insufficient_scope. The full response from Playground:
HTTP/1.1 403 Forbidden
Content-length: 232
X-xss-protection: 1; mode=block
X-content-type-options: nosniff
Expires: Mon, 03 Feb 2014 17:23:17 GMT
Server: GSE
Cache-control: private, max-age=0
Date: Mon, 03 Feb 2014 17:23:17 GMT
X-frame-options: SAMEORIGIN
Content-type: application/json; charset=UTF-8
Www-authenticate: Bearer realm="https://www.google.com/accounts/AuthSubRequest", error=insufficient_scope, scope="https://www.googleapis.com/auth/analytics"
{"error":{"errors":[{"domain":"global","reason":"insufficientPermissions","message":"User does not have sufficient permissions for this profile."}],"code":403,"message":"User does not have sufficient permissions for this profile."}}
Four scopes are available to execute this line according to the OAuth 2.0 Playground (but might there are others because there is a field too):
https://www.googleapis.com/analytics/v3/data/ga?ids=ga:XXXXXXXX&start-date=2014-01-03&end-date=2014-02-03&metrics=ga:visits,ga:bounces I have add the developer emails for the
Client ID for web application and for the
Compute Engine and App Engine as well to the site account in Analytic that has the XXXXXXXX id, but I always get this answer. Anyway different queries works properly.
What should I do to make it work? What can be the problem?
Many thanks,
Adam