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

*爱你&永不变心* 提交于 2019-12-24 12:26:22

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/28772554/google-calendar-api-cant-list-events-from-secondary-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!