Hi,

You need to upgrade the token you got back in the query string to a
session token after setting it:

client.UpgradeToSessionToken()

If you have further trouble with the Contacts API, feel free to ask in
their developer forum:

http://groups.google.com/group/google-contacts-api

Cheers,
-Jeff

On Sep 17, 12:11 pm, kevin j <[EMAIL PROTECTED]> wrote:
> Hi, I'm using python-gdata-client with Plone, but I think my problem
> has nothing to do with Plone, so it's fairly generic.
>
> So I have a link on my login page which is an AuthSubRequest that
> looks 
> like:https://www.google.com/accounts/AuthSubRequest?next=http://mydomain.c...
>
> After granting the access, I got my token, which is appended to the
> URL I gave as 'next' parameter.  However, when I use this token in the
> gdata client, everytime I make a request it gives me a RequestError:
> 401, with 'reason': 'Token invalid - Invalid AuthSub token.'...
>
> Here's my code (googlelogin)
>
> [...]
> token=self.context.REQUEST['token']
> client=gdata.contacts.service.ContactsService()
> client.SetAuthSubToken(token)
> feed=client.GetContactsFeed()
> [...]
>
> I've checked and the token I got is exactly right...so what have I
> done wrong?
>
> Thank you,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Data Protocol" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/google-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to