How to create api credential file:
- go to https://console.developers.google.com/
- click dashboard
- create project
- name the project something
- leave org option and save
- at the top of the next page search for
calendar
- select
Google Calendar API
- click
enable
- click
API's & Services
small text in the top left corner - click
credentials
andCreate credentals
, thenOauth client id
- set app type to
Other
- click on
OAuth consent screen
- make up an app name
- under scope, select option:
View events on all your calendars
with readonly lock icon - save
- click on
credentails
again and there will be a download option beside your credentail. Download the.json
file and save to the same directory as the script and rename toapi_secrets.json
- run the script and a browser should popup prompting to allow the application.
- once you have provided consent, the script should now work.
Install script dependencies (Python 3.x)
pip install -r requirements.txt