Google Calendar API - set guest can modify to true - node.js

I'm using the google calendar api for a calendar web app. My app allows users to create and modify calendar events and it syncs these changes with user's google calendars. I recently noticed that when one user creates an event and invites another user to that event, that invited user can only change the topic of the event for his/her calendar, not for all the other participants. I would like one user's changes to be reflected on the google calendar's of all the other participants. Google Calendar's website provides an option for allowing guests to modify the event:
but I wasn't able to find where I could specify this option in the google calendar api. How can I use the gcal api to set guestsCanModify to true when an event is created?

2021 update:
Just set the guestsCanModify to true in Event object
https://developers.google.com/calendar/api/v3/reference/events

That is probably some Google magic in the Google Calendar website. If you check the documentation for Events.insert There is nothing about granting attendees permissions on the event. It would appear that you can only add a user to a calendar but not limit their permissions in anyway with regard to events.
However I think that is a new feature which makes me think it might be something they will be adding to the API in the future. It would be nice if they did.

Related

Deleting Events using Google API - Notifications 'From' coming from Admin account

I am currently working on a nest JS project that leverages the google node package to delete an event from a users calendar (gcal). Gcal successfully deletes the meeting, but the deletion notification to attendees comes from the administration account the api uses to connect.
Is there a way to alias the notification that is sent out to attendees so it looks like the owner of the calendar sent out the notification, not the google api administrator?
node package
https://www.npmjs.com/package/google
google api delete docs
https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#delete
This is the code snippet
// https://googleapis.dev/nodejs/googleapis/latest/calendar/classes/Resource$Events.html#delete
await this.calendar.events.delete({
calendarId,
eventId,
sendNotifications: true,
sendUpdates: 'all',
});
Google Calendar will trigger the respective notifications based on the authenticated actor.
In your scenario, that will be "administration account the api uses to connect".
If you are using this automation script in a Workspace Environment, you may want to impersonate another user (like the event organizer for example) to delete the event.
To achieve that in a Workspace scenario, you will need Domain-Wide Delegation of Authority set up.
NOTE: Make sure the authenticated user (and/or the actor of the delete call) has enough permissions over the affected event in order to delete it or use an account with Calendar Admin role (or Super Admin).

How to send Google Calendar invite and auto add the event on calendar?

Actually, our software sends an ICS file to the customer at the end of an action, representing an event, but we want to make an insertion on the customer Google Calendar. I want to make a Google Calendar invite by email with the ICS file (similar with the meeting invite from Google Meet).
I am trying to discover how the Calendly add automatically an event on my calendar with a email invite and without any extra permission. Furthermore, I was using the Google API to do that, but every request use a OAuth permission, this is unviable to a backend service. I think a ICS file have no power to do that action. So now, I have no clue to do that. What have I supposed to do?

How to disable "Automatically add invitations to my Google Calender" by using the API

In the Google calendar user interface, it is possible to disable "Automatic adding of invitations to my calendar" as can be found in google's product forum.
However, can this setting also be done programmaticly by using the google calendar API? I would have expected to find this in the google calendar API reference.
Reason: My program is dynamicly creating/destroying new public accessable google calendars and I need to make sure that nobody can add events by just sending an email invitation to the corresponding calendar email address.

How to recognize which calendar the event belongs in Microsoft graph api?

I am developing application that synchronize with microsoft calendar.
To get any changes on Microsoft calendar I use webHook service and every time receive new/deleted/updated events but I do not know which calendar the event belongs, even after I get full event from Microsoft and not only the ID.
There are many calendars for user!
How can I recognize id of calendar?
The event resource has a calendar relationship, so that you should be able to do:
GET /me/events/{event-id}/calendar

Google Calendar live sync with node js app

I want to sync google calendar with my app.
When user add some event in the Google calendar at that time, I want these new event in my node server response
Means live sync with google calendar.
I want something like listener that listen new event.
With Google Calendar API you can watch for changes to Events or CalendarList resources, see this and this. Basically you will need to create an endpoint on your server which will receive events/calendars update notifications. When notification arrives, request a calendars/events synchronization. To make the synchronization efficient, use incremental sync. Check this question also to see the algorithm.
You may check this Quickstart tutorial and node-google-calendar.
You need to create a service account if you don't have one. A public/private key pair is generated for the service account, which is created from the Google API console. Take note of the service account's email address and store the service account's json or P12 private key file in a location accessible to your application. Your application needs them to make authorized API calls. If a user wants to give access to his Google Calendar to your application, he must give specific permission for each of the calendars to the created Service Account using the supplied email address under the Google Calendar settings.

Resources