Google Calendar API Integration

  • Updated on June 14, 2024

INTRODUCTION

This guide shows the steps required to create an API integration between Google Calendar and supported Grandstream devices. To set up this integration successfully, the user needs to have a Google Account with Workspace enabled to access Google Workspace API, and a Grandstream device that supports Google Calendar API integration.

GOOGLE API CONFIGURATION

Create Google Cloud Project

To use Google Workspace API, the user should access Google Cloud Console and create a project, to do that, please follow the steps below:

  1. Please access Google Cloud Console using the following link: https://console.cloud.google.com/
  2. Log in using your Google account if you have not done that already.
  3. Once logged in, click on the name of your organization to open the list of projects, as shown in the screenshot below
Google Cloud Console Home Page
  1. Click on “New Project” to create a new project
Projects List
  1. Enter the project name and click “Create”
Create New Project

Enable Google Calendar API

  1. Using the following link https://console.cloud.google.com/marketplace access the marketplace of Google Cloud and search for “Calendar”
Google Cloud Market Place
  1. Click “Google Calendar API”, then make sure that your project is select, as highlighted on the top of the screenshot, then click on “Enable” to enable Google Calendar API.
Enable Google Calendar API

In this section we will configure the types of users which can use the API integration

  1. On the console of Google Cloud, on the side bar, click on “OAuth consent screen” as shown in the screenshot below, then select “Internal User” as the User Type. Please note that selecting this option means that only the users in the organization associated with the project will be able to user the API integration.
OAuth Consent Screen
  1. Click on “Create” after selecting the user type.
  2. Once that is done, now fill in the required fields.
App Registration 1
  1. Enter the authorized domain(s). Further in this guide, we will have to use a Redirect URI for OAuth authentication. The user should include the URI domain in the “Authorized Domain”. In the example below, we have set to authorize “grandstream.com” as the authorized domain.
App Registration 2
  1. Enter the developer contact email under “Developer contact information” then click on “Save and Continue”.
  2. Then, click on “Add or Remove Scoopes” to add the scopes related to Google Calendar API.
API Scopes
  1. Select the scopes which are related to Google Calendar API as shown in the screenshot below. Once selected, click on “Update”
Select Calendar API Scopes
  1. Click on “Save and Continue”, then the summary screen will appear where you review the settings you have set. Once reviewed, click on “Back to Dashboard”.
Scope Configuration

Create API Credentials

The next step includes creating the credentials for the authentication. There are 3 types of credentials which can be created, but for this integration we will need to create OAuth credentials. Please follow the steps below to learn how to create them.

  1. From the dashboard of Google Cloud Console, please click on “Credentials” on the left sidebar of the dashboard, click on “Create Credentials”, then click on “OAuth client ID”.
Create OAuth Credentials
  1. Select “Web application” as the Application Type, then enter the name of the application in the corresponding field. Enter the URI which will be used for the redirection in Authorized redirect URIs. Once that is configured, please click on “Create”.
    Note: This may take from 5 minutes to a few hours to be set.
Authorized Redirect URIs Configuration
  1. The Client ID and Client secret will appear, we will need to keep this window for the next step.
Client ID & Client Secret

API CLIENT CONFIGURATION

This section shows how to configure the API client using the Client ID and the Client secret that we have generated from the previous section. In this example, we are using a UCM6300 Audio Series unit to integrate with Google Calendar API. Please follow the steps below to connect the client to the API successfully.

  1. Log into the UCM device using the super administrator account, then navigate to Integrations > Google Services, then copy and paste the Client ID and the Client secret in their respective fields. Enter the redirection URI in the Authorized redirect URIs, if you have set only one redirection URI on Google API, you can leave this field empty. Then click “Save”
Google Calendar Integration
  1. Click on to request access and provide consent to the integration.
  2. Choose the account or log in using your Google account.
Google Sign in Page
  1. Understand the requirements and permissions which will be granted then click “Allow”
Google Account Consent Page
  1. A token will be generated after that which can be copied as shown below.
Authorization Code

You can also copy it directly from the address bar, as shown in green highlight below

Web Browser Address Bar
  1. Paste the authorization token in Authorization Code field, then click

You will get to following message to indicate that the integrations has been done successfully.

Authorization Successful

EXAMPLE SCENARIO

To demonstrate how this option works, we will schedule meeting on the UCM. To do that, please navigate to Call Features > Multimedia Meeting (Meeting for UCM6300 Audio Series) > Meeting, then click on “Schedule Meeting“. Make sure to enable “Sync to Google Calendar” as shown in the screenshot below. Then click “Save”.

Schedule a Meeting

The meeting will marked automatically on the calendar.

Google Calendar

SUPPORTED DEVICES

Device Model

Firmware Version

GCC6000 Series

PBX 1.0.25.11 or higher

UCM6300 Series

1.0.25.7 or higher

UCM6300 Audio Series

CloudUCM

1.0.25.13 or higher

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support