Using OAuth Authentication
Use the OAuth authentication standard to connect to Google Calendar. You can authenticate with a user account or a service account. The add-in facilitates this as described below.
Using a User Account to Authenticate to Google Calendar
The user account flow requires the authenticating user to interact with Google Calendar via the browser.
Embedded CredentialsSee Embedded Credentials to connect with the add-in's embedded credentials and skip creating a custom OAuth app.
Instead of connecting with the add-in's embedded credentials, you can register an app to obtain the OAuthClientId and OAuthClientSecret.
When to Create a Custom OAuth AppCreating a custom OAuth app is optional as the add-in is already registered with Google Calendar and you can connect with its embedded credentials. You might want to create a custom OAuth app to change the information displayed when users log into the Google Calendar OAuth endpoint to grant permissions to the add-in.
Using a Service Account to Connect to Google Calendar
Service accounts have silent authentication, without user authentication in the browser. You can also use a service account to delegate enterprise-wide access scopes to the add-in.
You need to create an OAuth application in this flow. You can then connect to Google Calendar data that the service account has permission to access. See Custom Credentials for an authentication guide.
Creating a Custom OAuth App
See Creating a Custom OAuth App for a procedure.