AI-generated Key Takeaways
-
Setting up for a developer involves enabling the Chrome Device Token API in the Google Cloud Console and creating a service account with a JSON key.
-
For a customer, setup requires enabling domain-wide delegation in the Google Admin Console and authorizing the service account's client ID with the necessary OAuth scope.
-
A service account can be used with proper admin privileges for a customer by setting up Domain-Wide Delegation.
Setup for a developer
Enable API suite for cloud project
- Navigate to Cloud Console: https://console.cloud.google.com/.
- Select existing cloud project or create a new one.
- Go to
APIs & Services > Enable APIs and Services
. - Search for “Chrome”.
- Select “Chrome Device Token API”.
- Familiarize yourself with Terms of Service.
- Click
Enable
.
Create Credentials
Create Service Account
- Go to
APIs & Services > Credentials > Create Credentials > Service account
. - Enter service account name and click
Create
. - Create a key for your service account. Click
Add Key
and create “json” key. Keep track of the file in a secure location. - Use your service account with proper admin privileges for customer:
- Customer may set up Domain-Wide Delegation and then the service account can impersonate a user/admin who has proper privileges (see how)
Setup for a customer
Enable domain-wide delegation
- As customer admin, go to Admin Console (https://admin.google.com/).
- Navigate to
Security > Access and data control > API Controls > Domain-wide delegation
. - Click
Add new
. - Enter client ID ("service account unique id").
- Enter all necessary OAuth scopes.
https://www.googleapis.com/auth/chromeosdevicetoken
. - Click
Authorize
.