-
Notifications
You must be signed in to change notification settings - Fork 0
Google Calendar authorization
Abhijeet Rastogi edited this page Oct 24, 2023
·
21 revisions
-
Login to console.cloud.google.com
-
Visit with the right logged-in user
https://console.cloud.google.com/getting-started?authuser=2
- Create new project or use existing project.
https://console.cloud.google.com/projectcreate?authuser=2
- Navigate to "Google Calendar API" page and "Enable it"
- Search "google calendar api" and choose "Google Calendar API"
5 Enable Google Calendar API.
- Create credentials.json
- Create Oauth Application
- Configure OAuth Consent Screen
- Choose
External
- Add your email ID as "Testing users", otherwise you'll get the "App unverified error" while getting the token.
- For scopes, leave everything empty.
- Choose
- Create oauth client
Download JSON, rename it to credentials.json
and move to ~/.config/calsync/credentials.json
.
- Install gcloud cli:-
➤ brew install --cask google-cloud-sdk
- Login, create new project:-
➤ gcloud init
- Create new project, make sure its unique, I added my suffix to make sure its unique.
➤ gcloud projects create calsync-shadyabhi
- Select project
➤ gcloud config set project calsync-shadyabhi
Updated property [core/project].
- Enable Google Calendar
➤ gcloud services enable calendar-json.googleapis.com
Operation "operations/acat.p2-582178116564-5d220b48-62d8-493b-b547-eef961491467" finished successfully.
- Create service account, provide right permissions.
➤ gcloud iam service-accounts create calsync-sa
Created service account [calsync-sa].
➤ gcloud projects add-iam-policy-binding calsync-shadyabhi --member="serviceAccount:[email protected]" --role="roles/owner"