This repository was archived by the owner on May 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
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.
-
Go to the Google Cloud Console and create a new Project
-
Now switch to the newly created Project (Can be done through the notifications panel by clicking
Select project
→ see screenshot) -
Open the sidebar and select
APIs & Services
, then go into theEnabled APIs & services
menu item -
Click
Enable APIs and services
at the top, search forcalendar
and add theGoogle Calendar API
to your project (see screenshot) -
Open the sidebar and go into the
OAuth consent screen
menu item- Select
External
onUser type
- Fill out the required information (name, email, dev contact)
- Click
Add or remove scopes
(see screenshot below)- Here search for
calendar
and selectGoogle Calendar API
- Now select
../auth/calendar.readonly
and../auth/calendar.events
under the scopes - Click
Update
to add the scopes to your OAuth2 screen
- Here search for
- Under test users enter your account email
- Select
-
Open the sidebar and go into the
Credentials
menu item- Click
Create credentials
and create anOAuth client ID
- Select an App type of
Web application
and fill in the required information - Add
https://developers.google.com/oauthplayground
as an authorized redirect URI - Now past your Cliend ID and Secret into your
.env
file
- Click
-
Go to the OAuth 2 Playground and click the cog icon
- Select
Use your own OAuth credentials
and paste in your client ID and secret (see screenshot) - In the sidebar of the website scroll down until you find
Google Calendar API v3
and expand it - Select the scopes
https://www.googleapis.com/auth/clanedar.readonly
andhttps://www.googleapis.com/auth/clanedar.events
and clickAuthorize APIs
(see screenshot) - Fulfill the OAuth for your account
- Click
Exchange authorization code for tokens
and copy your refresh token to your.env
file (see screenschot)
DONE!
- Select