Dear Experts,

I'm writing a small Python demo CGI program to get into the Calendar
API.

Everything is great in my command-line version because I explicitly
use my user/password there.

Things also go well when the user first goes to my CGI page: no
'token' parameter means "display link to Google to authenticate and
come back to the same place".

That works great - my CGI program detects the 'token' parameter and
displays a list of my calendars - Great!

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.

For example, the initial callback page is www.demo.com/cal?token=abcd
then links after authenticating look like 
www.demo.com/cal?token=abcd&page=2&cal=GoodStuff

However, after using the token the first time, clicking any subsequent
page of mine always yields a gdata.service.RequestError:

{'status': 401, ... 'reason': 'Token revoked'}

Should I be using a cookie to save the token? The documentation
definitely raised that as an option but I figure once I make the token
a long lived token, I should be able to use it again via a CGI
parameter.

By the way:
- I definitely set "session = True" when calling GenerateAuthSubURL().
- I definitely call calendar_service.UpgradeToSessionToken().
- I'm not explicitly revoking the token anywhere

I have a feeling its an easy issue... Any ideas?
Thanks!
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to