|

Generate Client ID and Secret for Google Calendar integration

Note: This method is only applicable if you have enabled self-hosted Google Calendar integration as described in the documentation linked here: https://latepoint.com/docs/how-to-enable-self-hosted-google-calendar-setup/

In order for your agents to connect their Google Calendar to LatePoint – you need to create a Google API project for your website to generate OAuth credentials.

Creating new Google API project

To start visit Google Developer Console https://console.developers.google.com and click Create to create new project:

gcal api setup 1

Give your project any name you want and click “create” button:

gcal api setup 2

Enable Calendar API:

gcal api setup 3

Search for “calendar” and click on Google Calendar API:

gcal api setup 4

Enable Google Calendar API

CleanShot 2022 05 07 At 12.15.06@2x 1024x634

Now you need to create credentials for your project:

CleanShot 2022 05 07 At 12.16.49@2x 1024x436

Creating Credentials

Creating credentials for your application is a 5 step process, at the end of the process you will get your generated client ID and client secret. Follow these steps to create credentials for your application:

1. Credential Type

Select User Data and click next:

CleanShot 2022 05 07 At 12.24.02@2x 1024x511

2. OAuth Consent Screen

Enter your application information, which will be shown on a consent screen when your agents are connecting their Google Calendar:

CleanShot 2022 05 07 At 12.26.41@2x 1024x622

3. Scopes

You need to add scopes that your application will collect from agents who sync their calendars.

CleanShot 2022 05 07 At 12.33.25@2x 1024x453

Search for “calendar” and pick Google Calendar API scope (!important, pick the one that says …/auth/calendar). Scroll down and click “Update” button to save it.

CleanShot 2022 05 07 At 12.35.50@2x 1024x611

You should see that scope being added to the list of “Your sensitive scopes”. Now hit Save and Continue button

CleanShot 2022 05 07 At 12.38.23@2x 1024x493

4. OAuth Client ID

Select “Web Application” for the Application Type, then add your site URI in “Authorized JavaScript Origins” section:

CleanShot 2022 05 07 At 12.46.03@2x 1024x630

Note: It may take 5 minutes to a few hours for settings to take effect

5. Your Credentials

You can now download your credentials in a json file

CleanShot 2022 05 07 At 12.54.56@2x 1024x590

Open the .json file your downloaded and search for client_id and client_secret values, copy them (do NOT include quotes) and paste into your LatePoint Google Calendar Settings:

CleanShot 2022 05 07 At 13.04.23@2x 1024x531
self hosted gcal api setup

External vs Internal User Type

There are two user types available in Google Application: Internal and External. By default Google sets your application’s user types to “Internal”. You can read more about differences between them by clicking here.

Important!

Authorizations by a test user will expire seven days from the time of consent. If your OAuth client requests an offline access type and receives a refresh token, that token will also expire. It means that your external test agents will have to “Sign in with Google” every 7 days to be able to automatically sync their calendars.

Testing mode also comes with some Rate limitations. If you are having trouble with auto-syncing calendars – make sure you are not hitting your Rate limits:

CleanShot 2022 05 07 At 13.49.40@2x 1024x764
Was this doc helpful?
What went wrong?

We don't respond to the article feedback, we use it to improve our support content.

On this page