I was unable to find how to remove or delete a calendar for a user in my workspace.
I think I understand how to determine which calendars are shared with a specific user, with the help of this thread: Get list of shared calendars through Google Calendar API
So let’s assume this is really the only way to identify which calendars are shared with other users.
- I couldn’t find a way how to delete these calendars for another user.
- I couldn’t find a way to get shared calendar between 2 users in my workspace (only calendars that I shared with users).
- Same problem goes for cancel all future events for a user in my workspace.
If the user in my workspace created meeting in his own calendar, I can cancel them with this API.
Here is what I tried (that didn’t work):
-
Get all calendars:
https://www.googleapis.com/calendar/v3/users/me/calendarList
-
For each calendar that is not marked as primary, I call with get calendar ACL:
https://www.googleapis.com/calendar/v3/calendars/{calendarId}/acl
Which there I can see my shared user:
}
"kind": "calendar#aclRule",
"etag": ""005555555500"",
"id": "user:[email protected]",
"scope": {
"type": "user",
"value": "[email protected]"
},
"role": "reader"
}
- Then I try to delete him with the API:
https://www.googleapis.com/calendar/v3/calendars/calendarId/acl/ruleId
Link to doc: https://developers.google.com/calendar/api/v3/reference/acl/delete
The API returns success, but the user is still shared with the calendar.
- What could be done differently?
- How can I get all shared calendars for a user in my workspace?
Any help would be much appreciated!
Liad Brettler is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.