Getting 401 error - Login Required when accessing the data

174 views
Skip to first unread message

natese.se...@gmail.com

unread,
Jan 23, 2013, 6:27:51 PM1/23/13
to ga-easy-da...@googlegroups.com
I have been consistantly getting 401 error Login Required when trying to run the demo on our server. (Authorisation seems to be working fine and tokens are being returned successfully)

Strangely the only time it works is if I use the Google APIs Explorer first to test accessing analytics.management.webproperties.list for example.

when the API Explorer returns a 200 ok response  the demo running on my site suddenly starts working for a few minutes.

the online demo also only works when I retrieve a 200 ok response from the API Explorer.


The Authentication OAuth 2.0 process seems to be working because a new token is returned successfully when I authorise access to the data.

it's only when I try and call gapi.client.analytics.management.webproperties.list or gapi.client.analytics.data.ga.get

Any clues as to what is going on and how to get the demo to work without the 401 errors.


Cheers Mat
Reply all
Reply to author
Forward
0 new messages