In order to communicate with the Google Calendar API, you will need to create a project, enable the Google Calendar API, configure all of the permissions and download your OAuth credentials. Since this guide was originally written, Google has changed their API multiple times. You can look at https://developers.google.com/calendar/quickstart/python as an overall reference, but we'll cover the steps below.
Start by going to https://console.actions.google.com/ and clicking New Project
If you have accidentally closed the window, you can get to Device Registration by going back to the Actions Console and Selecting your project. After that, click on the Develop tab, the 3-Bar Menu in the upper left, and the Device registration menu item.
Fill in the fields with the requested information. For device type, choose Phone. Make note of your Model ID and save it in a safe place. Click the Register Model Button.
Click Download OAuth 2.0 Credentials and save the JSON file and put it in a safe place such as your Desktop. Save the file as credentials.json. You will upload this to your Raspberry Pi in a later step. Click Next.
Google Calendar API Setup
Go to the Google Developers Console to enable the API at https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview
Before clicking the button, we need to select the project we created in the first step. By default, the incorrect project is selected.
Next, head over to https://console.cloud.google.com/ and verify your project is selected. If not, click the project selector at the top.
This opens a dialog box of projects. If the project you created in the first step is not listed here, click inside the search box at the top.
Start typing the name of the project in the search box and click on the result that comes up. Click Open.
This will take you to the API Library. In the search box, type Calendar and click on the Google Calendar API result.
Once it is enabled, you will be taken to the Overview Screen. Click on the Credentials tab on the left and then click the Configure Consent Screen button on the right.
For User Type, select the option you would like and click Create.
Internal is the preferable option for this type of project because it doesn't require you to submit the app for verification, but this only works for Google Workspace users and not regular Gmail accounts.
Enter an Application Name. This is the name that will appear on the permissions screen.
Select a Support Email. This is the email that will appear when you click on the Application name on the permissions screen.
You may need to add another Email Address under Developer contact information near the bottom of the form.
Scroll to the bottom and Click Save and Continue
Text editor powered by tinymce.