On Oct 23, 6:29 pm, Andrew <[EMAIL PROTECTED]> wrote:
> However, I want to continue doing other things with the calendar,
> which I enable with links on the authenticated page - I don't use
> cookies, but I do pass the token to all subsequent invocations of the
> page.
I found the problem!
I read the source to UpgradeToSessionToken(): a request is sent to the
server given the current token to return a session token. That session
token is saved internally in the service object and the original token
is thrown away - makes perfect sense.
The problem was that my code was keeping the *original* token it
received from the Google redirector.
The solution is to retrieve (and store/pass around) the *upgraded*
token, like this::
calendar_service.UpgradeToSessionToken()
token=calendar_service.auth_token # save the upgraded token
...
url=urllib.urlencode({'token': token, 'foo': 'bar'})
print "<a href='?%s'>Some other function with this token</a>" % url
Works great!
Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Calendar Data API" 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-calendar-help-dataapi?hl=en
-~----------~----~----~----~------~----~------~--~---