Hey guys,
I'm trying to port Quicklytics, my iPhone app (
quicklytics.com) to the new v3 API, but I'm getting an error when trying to get data from the Data Export API.
Everything goes fine with OAuth (authentication, and then getting the real token), but once I call the analytics API to get data, I get the 403 error. I tried passing the auth token via both a header parameter ("Authorization: Bearer __CODE___") and the URL parameter ("&access_token=__CODE__), and I always get the same error:
{"error":{"errors":[{"message":"Forbidden"}],"code":403,"message":"Forbidden"}}
I would appreciate any help! More info below:
I tried also the Google API Explorer, and I get this error:
analytics » v3 » data.ga.get executed moments ago time to execute: 109 ms
You do not have permission to execute this method.
I have also tried the Google OAuth 2.0 Playground, and i get the same error (auth code is modified):
GET /analytics/v3/data/ga?ids=ga:259287&dimensions=ga:Hour&metrics=ga:Visits,ga:Pageviews,ga:Bounces&start-date=2011-12-24&end-date=2011-12-26 HTTP/1.1
Host: www.googleapis.com
Authorization: OAuth ya29.AHES6ZTQkuiFsMS____SOMETHINGHERE_____mO_KQqmkTbw-S7j2xbYw
HTTP/1.1 403 Forbidden
status: 403
content-length: 79
x-xss-protection: 1; mode=block
x-content-type-options: nosniff
expires: Thu, 29 Dec 2011 03:30:49 GMT
x-google-cache-control: remote-fetch
server: GSE
via: HTTP/1.1 GWA
cache-control: private, max-age=0
date: Thu, 29 Dec 2011 03:30:49 GMT
x-frame-options: SAMEORIGIN
content-type: application/json; charset=UTF-8
-content-encoding: gzip
{"error":{"errors":[{"message":"Forbidden"}],"code":403,"message":"Forbidden"}}