7

I'm writing an app which adds events from our server to user's Google Calendar using API. And I encountered a HTTP 409 Conflict error following this scenario:

  1. Create an event with some explicitly defined ID / Events: insert
  2. Delete the event / Events: delete
  3. Try to create event with the same ID - get the error.

This scenario can come true when:

  1. a user exports events from our server.
  2. one of the events (say with ID = 1) will be disabled on our server
  3. the user exports again the events - this disabled event will removed from user's Google Calendar / API call: delete, eventId = 1
  4. the disabled event will be enabled again
  5. the user performs export - API insert request will be fired with the same ID = 1 . And error 409 will be raised. / API call: insert, eventId = 1

It seems that an event in fact isn't removed after invoking delete API method. Is there any workaround for this issue?

2
  • Wild guess: if an attempt is made to add an entry with a scope whose type and value match another entry already in the access control list, the operation will fail with error code 409 (Conflict). I would look at ACL make sure the old stuff was deleted as well. Dec 18, 2014 at 9:34
  • 1
    It turned out that so-called "delete" operation in fact don't delete anything - just hide events and change their status to "cancelled". So such events continue to exist in Google Calendar. As workaround I get deleted entries using "showDeleted" = true as well and then updating them.
    – UpVs
    Dec 18, 2014 at 11:48

1 Answer 1

13

It turned out that the so-called "delete" operation in fact doesn't delete events, just hides them and changes their status to "canceled". So events continue to exist in Google Calendar.
As a workaround I retrieve deleted entries using "showDeleted" = true option and update them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.