|

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: http://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

google setup 1

Now you need to create credentials for your project:

google setup 2

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:

google setup 3

2. OAuth Consent Screen

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

google setup 4

3. Scopes

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

google setup 5

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.

google setup 6

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

google setup 7

4. OAuth Client ID

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

google setup 8

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

google setup 9

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:

google setup 10
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:

google setup 11
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