문제

I'm creating a bunch of events (a school timetable) via the Google calendar API v3. I'm authenticating my program via OAuth credentials obtains through the APIs console. Everything works well, except that all events have my Google account as their creator, and all of the calendars that the program creates appear in my 'Other Calendars' list. Is there any way of changing this behaviour?

The only thing I can think of is to log in to the APIs console with a service account (e.g. timetable@mydomain.com) and creating the client secrets from that.

도움이 되었습니까?

해결책

Yes, you'll need to authenticate as a service account and impersonate the user who you'd like to be the creator of the event. The Google Drive SDK has a good tutorial on using service accounts to impersonate users with the API, your process would be nearly identical except that you'd be using the Calendar API.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top