Hi,
I'm trying to use the Google Calendar Java API to create a secondary calendar for a Google apps user. The relevant code is:
// Initialise the API client
CalendarService googleCalendar = new GCalendarService("canimo.ca");
googleCalendar.setUserCredentials("
[email protected]", "secret");
// Create the calendar
CalendarEntry
cal = new CalendarEntry();
cal.title = new PlainTextConstruct(user.email);
cal.summary = new PlainTextConstruct("Collection calendar");
cal.timeZone = new TimeZoneProperty("America/Montreal");
cal.hidden = HiddenProperty.FALSE;
googleCalendar.insert(CALENDAR_URL, calendar);
The call to insert() above results in com.google.gdata.util.ServiceException: Internal Server Error and no calendar is created. If I try and perform the same operation through the Google calendar website, it also fails with the error message:
We could not save changes. Please try
again in a few minutes.
An obvious conclusion is that there's some problem on Google's side, but this has been going on for several days now. Strangely, if I create a new user, everything works fine for a while. I can create calendars via the website, and download them via the API. But as soon as I try and create a new calendar using the API, I get the exception above, and thereafter can't create new calendars using either the website or the API.
Thanks,
Don