Hi, I am trying to verify that my token works by hitting
https://www.google.com/accounts/AuthSubTokenInfo. Earlier this
evening, I was getting 403s and now I'm getting 401s, so I don't know
whether I've gotten myself blacklisted in the process of debugging.
I am using GData from a Firefox extension, so I am forced to use
ClientLogin rather than AuthSub. Is that the reason that my call to
AuthSubTokenInfo is failing? I don't see anything about it in the
docs:
http://code.google.com/apis/accounts/docs/AuthSub.html#AuthSubTokenInfo
Because I am doing this from a Firefox extension, I am using an
XMLHttpRequest:
// authToken is already defined
var url = '
https://www.google.com/accounts/AuthSubTokenInfo';
var xhr = new XMLHttpRequest();
var asynchronous = false;
xhr.open('GET', url, asynchronous);
var header = 'AuthSub token="' + authToken + '"';
xhr.send(null);
I also tried this outside of Firefox using cUrl, which also gives me a
401.
The strange thing is that my Firefox extension that uses the token
appears to work fine, so I have no reason to believe it isn't valid.
(I'm able to access my doclist and load files, etc.).
If it is the case that this method is not available to me because I'm
using ClientLogin, is there an alternative? Given that a ClientLogin
token seems to expire every couple of weeks or so, it seems quite
important that there is a way to check whether it is still valid so I
can prompt the user to enter his or her password again. (Obviously I
could just try to load the user's doclist as a proxy for checking the
validity of the token, but that seems wrong.)
Thank you,
Michael
--
You received this message because you are subscribed to the Google Groups "Google Data Javascript Client" group.
To post to this group, send email to
google-data-ja...@googlegroups.com.
To unsubscribe from this group, send email to
google-data-javascri...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-data-javascript-client?hl=en.