Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.

Setting up Google Calendar API

DerLev edited this page Jun 5, 2022 · 6 revisions

The setup of the Google Calendars API is a bit more complicated than the Notion Integration setup, but it requires just a few more steps.

Setup

  1. Go to the Google Cloud Console and create a new Project

  2. Now switch to the newly created Project (Can be done through the notifications panel by clicking Select project → see screenshot)

  3. Open the sidebar and select APIs & Services, then go into the Enabled APIs & services menu item

  4. Click Enable APIs and services at the top, search for calendar and add the Google Calendar API to your project (see screenshot)

  5. Open the sidebar and go into the OAuth consent screen menu item

    1. Select External on User type
    2. Fill out the required information (name, email, dev contact)
    3. Click Add or remove scopes (see screenshot below)
      • Here search for calendar and select Google Calendar API
      • Now select ../auth/calendar.readonly and ../auth/calendar.events under the scopes
      • Click Update to add the scopes to your OAuth2 screen
    4. Under test users enter your account email
  6. Open the sidebar and go into the Credentials menu item

    1. Click Create credentials and create an OAuth client ID
    2. Select an App type of Web application and fill in the required information
    3. Add https://developers.google.com/oauthplayground as an authorized redirect URI
    4. Now past your Cliend ID and Secret into your .env file
  7. Go to the OAuth 2 Playground and click the cog icon

    1. Select Use your own OAuth credentials and paste in your client ID and secret (see screenshot)
    2. In the sidebar of the website scroll down until you find Google Calendar API v3 and expand it
    3. Select the scopes https://www.googleapis.com/auth/clanedar.readonly and https://www.googleapis.com/auth/clanedar.events and click Authorize APIs (see screenshot)
    4. Fulfill the OAuth for your account
    5. Click Exchange authorization code for tokens and copy your refresh token to your .env file (see screenschot)

    DONE!


Screenshots

Adding project

add project

Notiofication panel after project creation

notifications

Google Calendar API search result

search result

OAuth2 scope selection

scopes

OAuth2 Playground settings

settings

OAuth2 Playground scopes

playground scopes

OAuth2 Playground tokens result

tokens result

Clone this wiki locally