1
votes

In Google Calendar, one can see 2 categories of calendars namely, My calendars and Other Calendars. Is there a way to determine which calendars belong to My calendars and Other calendars using Google Calendar API?

I looked at the response from gapi.client.calendar.events.list but was unable to find anything that specifies which category a calendar belongs to.

1
My Calendars is a primary calendar while the Other Calendars is a secondary calendar. See Calendar and Events. To know whether the calendar is on the primary calendar or not you can use the CalendarList resource which returns a response with primary property which will return true if the calendar is in primary and false otherwise.gerardnimo

1 Answers

1
votes

You should use .calendar.calendarList.list to retrieve the list of the calendars. If the accessRole says you are an owner for the calendar, then it's your calendar.