The Checks API uses OAuth 2.0 to authorize requests.

The OAuth scope is

Authorize with OAuth 2.0

This quickstart shows you how to authorize requests with a service account using the gcloud CLI.

Set up gcloud CLI

  1. Install the gcloud CLI.
  2. Login with the gcloud CLI and set a default project:

    gcloud auth login
    gcloud config set project PROJECT_ID
  3. Create a service account and service account key, and set up Application Default Credentials:

    gcloud iam service-accounts create SA_NAME
    gcloud iam service-accounts keys create key.json \

Grant API access to your Checks account

API callers must be users of your Checks account and have the appropriate read or write permissions.

  1. Go to the Settings page in the Checks Console and click Manage users.

  2. Invite the service account you created earlier:

Locate your account ID

Your Checks account ID is the resource ID for account resource requests.

For example, the accounts.apps.list method which lists your apps has the following format:

You can find your account ID on the Settings page under the Account information section in the Checks Console.

Get an access token

gcloud auth application-default print-access-token --scopes=

Make a request

curl -X GET \
    -H "X-Goog-User-Project: PROJECT_ID" \
    -H "Authorization: Bearer $(gcloud auth application-default print-access-token --scopes=" \

What's next?

See our Upload guide to learn how to upload your app for analysis.