Have a public Google Calendar where all I want to do is get the events from "today" up to n (or max) events. I've been running around in circles trying to figure it out, it's either depretiated information or the soutions don't seem to work. A good solution path is using PHP to generate the initial list of events with css goodness and javascript array so I can update a details DIV when the user clicks on an event.
Using PHP and uploaded the latest API to the server, have a calendar project with a read only account, an OAuth 2.0 client ID, and API key. Got close with a few tutorials but hit a snag because you need the './credentials/calendar-api-quickstart.json' which is generated through the command line. The server I have to use is a shared one so there is no command line access (for obvious reasons :)). Used the https://developers.google.com/google-apps/calendar/quickstart/php information. That seems to be the the only piece i'm missing?
Activated the key too through the info on this page Google Calendar API v3 hardcoded credentials but getting an "invalid_grant" error. I've tried everything that came up in search but nothing seems to work. Is there an accurate up to date tutorial (2016-2017) that walks you though getting the Google Calendar data into your site? From setting up the project to oauth2 and token generation. I've got to be messing something up because nothing seems to work.
The only other solution is to have them export the calendar as an .ics but they want live updates as they update the google calendar.
Because i'm just looking to read the data I tried the suggestion here Get JSON from a public Google Calendar. But I get the Forbidden Error 403 error so it's depretiated?
Still don't understand why they made it this complicated...I understand going through all the oauth stuff if you want to interact with the calendar on your site or app but just to read the data on a public calendar (which warns you making it public that everyone can see it)?
Thank you