As the Android Enthusiast discussed, only a member can update their calendar from a member. You should also check the documentation as he suggested. The answer below is a working example for node.js and python
To update an event, you need to have an event identifier and user email. Get an event from the calendar (with event ID), go through all the participants, change the responseStatus for that particular participant, and then update the Google calendar
For JS host using Google API
const { google } = require('googleapis'); const calendar = google.calendar({ version: 'v3', auth: 'YOUR-API-KEY-HERE' });
For python using googleapiclient
from googleapiclient.discovery import build calendar = build('calendar', 'v3', credentials=credential) event = calendar.events().get(calendarId='primary', eventId='eventId').execute() For attendee in event['atendees']: if atendee['email'] == user_email: attendee['responseStatus'] = 'accepted' break #update the google event udated_event = calendar.events().update(calendarId='primary', eventId=eventId, body=event).execute()
source share