Connect to a user's calendar without a Google calendar

I am creating a web page for booking. This page should check one of my publicly available programs to see if the trailer is available:

Event Example

I want to use the Google Calendar API for this purpose, the API should provide me with a list of dates in the Google calendar. To do this, I made a page based on the quick launch of the Google JavaScript JavaScript API.

The only problem is that it is loading the calendar of the current user (for example, freddi@gmail.com ), but I want it to open my calendar ( thomas.leflere@gmail.com ). How to change JavaScript quick-launch code JavaScript API to achieve this?

Quick Launch Google Calendar Java Browser

+5
source share
1 answer

The links you saw use non-REST APIs. Obtaining this software is possible using the service account. Details on how to create a service account can be found on the Google two-way OAuth page, snippet

Typically, an application uses a service account when the application uses the Google API to work with its data, and not with user data. For example, an application that uses the Google Cloud Datastore for persistence data will use the service account to authenticate its Google Cloud Storage API calls.

Since this method involves placing the private key on the computer that initiates the API call, it seems that doing this directly from the browser in JavaScript will not be viable. An intermediate server is required.

A better alternative to JavaScript would be to call the AJAX REST API of the public calendar, which is now in version 3. You can find the API documentation at https://developers.google.com/google-apps/calendar/v3/reference/

0
source

All Articles