简体   繁体   中英

Google Calendar API - Can"t list events from secondary calendar

I'm using the google calendar API in javascript with google-oauth-jwt.

For a target user, I can list events from its default calender (after having shared it with the service account email).
With a simple "get" on https://www.googleapis.com/calendar/v3/calendars/myuser@mydomain.com/events

If I create a new calendar for this user directly 'by hand', I can't see any of the events from this calendar even if I shared it with the service account.

Do I forget something ? Any Idea ?

Thanks.

Secondary calendars have their own calendar ID values. In place of myuser@example.com for the calendar id, you need something like

 9eabcd1234fecba09@group.calendar.google.com

That you can find in the Calendar web page by clicking the little down arrow next to the calendar's name in the My Calendars display, and choosing "Calendar settings."

I don't believe the API gives you a feature that will merge events from two different calendars.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM