How to list Google Calendar Events without User Authentication

旧时模样 提交于 2019-11-26 21:44:20

问题


On November 17, 2014 Google deprecated v1 and v2 of its Google Calendar API using the Zend Framework.

It seems the only way to list publicly shared events on a publicly shared Google Calendar is through the new Google Client Library API from GitHub using OAuth 2.0

This means visitors to a public website that used to display public events now have to authenticate and login.

Is that true? Is there no other way to continue to show public Google Calendar events?


回答1:


What you need to do is use a Service account for this. You will then be able add the service accounts email address as a user to the calendar for your website. The Service account will then be able to access this calendar including the events




回答2:


You can still retrieve all public data without Oauth2, you just need to register in a developer console and create an API key. Then you can do:

GET https://www.googleapis.com/calendar/v3/calendars/<CALENDAR_EMAIL>/events?key={YOUR_API_KEY}



来源:https://stackoverflow.com/questions/27117095/how-to-list-google-calendar-events-without-user-authentication

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