Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to modify an event created at Google Calendar from external app?

We are building an event management app, and we are investigating whether it is possible to let our users to create event directly from Google Calendar. Currently our workflow is:

  1. User creates an event in Google Calendar
  2. User adds our email address as guest of the event
  3. We receive event notification mail from Google Calendar, and register the event in our system.

Now we want to allow users to edit event details (specifically, description and location) on our app dashboard, and here comes the problem: how can we update the event in user's calendar?

I tried to use iMiP mails but failed, I tried to increase sequence number, and change ORGANIZER field to our own mail address, even if I marked the event as modifiable by guest in Google Calendar, the event couldn't be updated by our mail. (Update: Attached latest version of my test code, am I missing anything in my mail?) We also tried to send updated event as regular ICS file in attachment (directly via GMail) and failed too.

On the other hand, if we change UID in the event ICS file, send it as regular attachment, and import it to Google Calendar, then this (new) event can be updated by subsequent ICS file with the same UID. However we don't want to implement in this way since it creates a new event in user's calendar.

So my question is, other than using Google's Calendar API (which is our last resort if there is no other good way to implement this), is there any way to update user's event from our app?

like image 440
SAPikachu Avatar asked Jul 18 '15 11:07

SAPikachu


People also ask

Can you Import ICS file into Google Calendar?

You can import with ICS and CSV files on a computer. Open Google Calendar. Settings. In the menu on the left, click Import & Export.


1 Answers

The only way your application is going to be able to edit the event will be though the Google Calendar API.

You are going to have to use Oauth2 authenticate the user get access to the calendar in question. The search for the event using events.list probably adding the q tearm to search for an event over date.

Once you have the event in question, you should look at events.patch patch lets you update just selected fields in the event rather then a full event.update which will require that you update all of the fields in the event.

like image 98
DaImTo Avatar answered Sep 21 '22 13:09

DaImTo