How the pieces fit together
Create one service account per
integration. Choose an API key or an OAuth client for that account; you do not
need both methods on each API request. Neither credential can exceed the
account’s current permissions.
The quickstart uses Basic authentication. A Bearer header is also supported for
API keys; using that header does not mean you need an OAuth client.
Choose an API key for a straightforward integration
Use an API key for your own scheduled jobs, reporting scripts, data pipelines, or other backend services when a secret stored in your secret manager fits your security requirements.- Make authenticated requests directly; no token exchange is required.
- Select only the permissions the workload needs and set an expiration.
- Rotate the key using its overlap window, or revoke it immediately if exposed.
Choose OAuth for short-lived access tokens
Use OAuth client credentials for a confidential backend service when your organization requires expiring access tokens or an integration tool expects theclient_credentials grant.
- Create a scoped OAuth client for the service account.
- Authenticate the client to your regional token endpoint using the client authentication method supplied during setup.
- Send the resulting access token with your API requests. Obtain a new token before the current token expires.

