Next, authorize your service account’s client ID.
From the Admin console Home page, go to Security API controls.
Under Domain wide delegation, click Manage Domain Wide Delegation.
On the Manage domain wide delegation page, click Add new.
Under Client ID, enter your service account's client ID.
You can find the service account client ID in the JSON file you downloaded when you created the service account. Alternatively, you can find the client ID in the Google Cloud Platform Console. Click IAM & AdminService accounts, then select your service account.
Note: Make sure you use the service account client ID, not the OAuth Web client ID.
- In the OAuth scopes field, copy and paste the following comma-delimited list of scopes:
- Click Authorize.
To make sure every scope appears, select the new client ID and click View details.
If they don't, click Edit, enter the missing scopes, and click Authorize. Note that you can't edit the client ID.
If you get an error, the client ID might not be registered with Google or there might be duplicate or unsupported scopes. The app should be available for use within an hour, but might take up to 24 hours.