Google Calendar Service Account with PHP API oauth2.0 - How to access calendars that are not shared

后端 未结 2 1281
轻奢々
轻奢々 2021-01-25 21:33

I\'m having trouble reading calendar events with the PHP libraries provided by Google. The calendars that I want to read are NOT publicly shared, but I want to read them on my s

相关标签:
2条回答
  • 2021-01-25 21:50

    Thanks for your suggestion.

    It turns out the problem was that the person in charge of the API account did not to share the calendars with the developer account's server account e-mail.

    Since I didn't have access to the API account settings and the error from Google Calendar API was not very descriptive it took a while to figure out.

    0 讨论(0)
  • 2021-01-25 22:09

    If you want to access private calendars with a service account, you will need to either perform an authority delegation if you own the domain containing those calendars (https://developers.google.com/drive/web/delegation describes it for drive but it works for calendar) or you will need to share the private calendar with the email address of the service account.

    0 讨论(0)
提交回复
热议问题