Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list Google Calendar Events without User Authentication

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?

like image 859
H. Ferrence Avatar asked Dec 09 '22 05:12

H. Ferrence


2 Answers

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

like image 155
DaImTo Avatar answered Dec 28 '22 06:12

DaImTo


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}

like image 38
luc Avatar answered Dec 28 '22 06:12

luc