HTTP/1.1 401 Unauthorized WWW-Authenticate: AuthSub realm="https://www.google.com/accounts/AuthSubRequest" allowed-scopes="https://www.googleapis.com/auth/analytics.readonly,https://www.googleapis.com/auth/analytics" Content-Type: application/vnd.google.gdata.error+xml; charset=UTF-8 Date: Tue, 26 Jun 2012 08:36:59 GMT Expires: Tue, 26 Jun 2012 08:36:59 GMT Cache-Control: private, max-age=0 X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block Server: GSE Transfer-Encoding: chunked <?xml version="1.0" encoding="UTF-8"?> <errors xmlns="http://schemas.google.com/g/2005"> <error> <domain>GData</domain> <code>authError</code> <location type="header">Authorization</location> <internalReason>Invalid Credentials</internalReason> </error> </errors>
3) Then use the token (step 6) to execute the following query (old request url): https://www.google.com/analytics/feeds/datasources/ga/accounts you should receive a successful response.4) now execute the following query to the Management API: https://www.googleapis.com/analytics/v2.4/management/accounts and you should also receive a successful response. And it should work the same when you add the key parameter: https://www.googleapis.com/analytics/v2.4/management/accounts?key=YOUR_API_KEY