Warm tip: This article is reproduced from stackoverflow.com, please click
api google-calendar-api google-api event-id

Google calendar API move event

发布于 2020-04-05 23:36:24

Heres the deal,

On googles developer website they have at the bottom of each api function description a tool to try out the api, specifically I am using the calendar api (where it says " Use the APIs Explorer bellow to ...): https://developers.google.com/google-apps/calendar/v3/reference/events/get

This call returns an event when you enter a calendar ID and an eventID. After switching the little OAuth2.0 switch on and entering my calandarID and an event ID of mine it returns a nice 200 ok response with the event details.

Heres the problem: I go over to the move function in the calendar api: https://developers.google.com/google-apps/calendar/v3/reference/events/move

And fill in once again my calendar ID containing the event I want to move, the event ID (same as before) and the destination calendar ID (my other gmail account). but on executing this I get a red box with "the resource was not found" and the response is a 404.

Weird thing is I have been able to do this via the actual google calendar website by going into edit event -> drop down: calendar -> change owner, I get a box to fill in new calendar ID and it successfully went to my other gmail. Both calendars where not public when I tried via the GUI and are not public now when using the API. Preferably I want them to stay that way.

Any ideas why the api for moving a calendar event is not working for me?

Questioner
Jimmie
Viewed
88
SGC 2015-08-15 00:32

To move an event using events.move, you should have write access to both the calendars. I tried to move to different gmail account but it gave 404 error. But when I tried with moving to secondary calendar, it worked for me. developers.google.com/google-apps/calendar/concepts