| Subject: | Google Calendar Private Token Issue | |
|---|---|---|
| From: | Fiyawerx () | |
| Date: | Sep 8, 2007 11:46:03 am | |
| List: | com.googlegroups.google-calendar-help-bugs | |
I'm using the gdata module for python, and when I try to run a script to pull all the events using the 'magic token' method, it will not work for any created calendar other than the one you get by default. I've tried with 6 different calendars and 2 accounts, the private 'html' links work fine, but when I use the sample below, only the 2 main calendars will work, the other ones return :
gdata.service.RequestError: {'status': 400, 'body': 'Incorrect private url.', 'reason': 'Bad Request'}
I have checked over and over the key and copy/pasted several times, always the main calendar will work but none of the others I create. Here is the sample code:
Note I don't mind sharing the private keys for now, will change them afterwards. This way people can check for themselves if they want.
---------------------
try: from xml.etree import ElementTree # for Python 2.5 users except ImportError: from elementtree import ElementTree import cgi import gdata.calendar import gdata.calendar.service import atom import atom.service import getopt import sys import string import time
username = [email address]' # This one works, it's my "main" calendar" that was there when I started visibility = 'private-8408d77375a23ae8848f2882519ec6af'
# This one does not work, the html link works, so I know the token is
valid, however when you plug it in, this script fails saying :
# gdata.service.RequestError: {'status': 400, 'body': 'Incorrect
private url.', 'reason': 'Bad Request'}
#
http://www.google.com/calendar/embed?src=7mbf275cfkaq137pmahvi8buv4%40group.calendar.google.com&pvttk=348e1326a8ddb48f201b4b3956965c08
visibility = 'private-348e1326a8ddb48f201b4b3956965c08'
projection = 'full'
query = gdata.calendar.service.CalendarEventQuery(username,
visibility, projection)
calendar_service = gdata.calendar.service.CalendarService() feed = calendar_service.CalendarQuery(query) for i, an_event in enumerate(feed.entry): print '\t%s. %s' % (i, an_event.title.text,)





