Manage API access via Google workspace
Perform the following steps to add scope to your service account.
- Go to admin.google.com.
- Log in to your Google admin account.
- On the Google admin home page, click on Security.
- Scroll down and click API controls.
- Click on MANAGE DOMAIN WIDE DELEGATION.
This is where you can add scopes to your service account. - Click Add New on Domain-wide Delegation page.
A dialog box appears where you can authorize the scopes. - Enter the following details in the dialog box.
- Client ID
Enter the Client ID you generated earlier. Click Obtain the Client ID to discover your client ID. - OAuth scopes (comma-delimited)
Enter the following scopes in this field, separated by a comma (,).
https://www.googleapis.com/auth/gmail.readonly,
https://www.googleapis.com/auth/calendar.readonly,
https://www.googleapis.com/auth/userinfo.email,
- Client ID
- Click Authorize.