Get started

To use the Chrome Printer Management API, a developer needs to enable the API and create the app's OAuth 2.0 credentials, then a Chrome administrator needs to grant the developer's script the necessary account access to manage printers. Admins can optionally block or trust apps developed to manage printers for their account.

Step 1: Enable the API

  1. Sign in to the Google Cloud Console.
  2. Select an existing cloud project, or create a new project.
  3. At the top left, click Menu Menu > APIs & Services
  4. At the top, click Enable APIs and Services. Then, search for "Admin."
  5. Select Admin SDK API from the search results list.
  6. Familiarize yourself with Terms of Service. Then, click Enable.

Step 2: Create OAuth 2.0 Credentials

  1. Sign in to the Google Cloud Console.
  2. At the top left, click Menu Menu > APIs & Services > Credentials.
  3. At the top, click Create Credentials > Service account.
  4. Enter a service account display name. Then, click Create. (You can skip the optional steps.)
  5. Select your new service account in the "Service Accounts" table.
  6. At the top, click Keys.
  7. Click Add key > Create key.
  8. Make sure "JSON" is selected, then click Create. Save the downloaded file in a secure location.

Step 3: Grant the service account access to managed printers

Before use, your new service account needs to be granted proper admin privileges. This can be done by an administrator for the account associated with the printers to be managed.

Option 1: Enable Domain Wide Delegation for the service account

Domain-wide delegation allows the service account to impersonate an admin who has the proper privileges to manage printers.

  1. As an administrator, sign in to the Admin console.
  2. At the top left, click Menu Menu > Security > API Controls.
  3. Click Manage Domain-wide Delegation.
  4. Click Add new.

    • For "Client ID," enter the service account's "Unique ID" as found in the Google Cloud Console.
    • For "OAuth scopes," enter all necessary authentication scopes. To manage printers, you need to add the following scope:

      https://www.googleapis.com/auth/admin.chrome.printers

  5. Click Authorize.

Option 2: Grant admin role privileges to the service account

  1. As an administrator, sign in to the Admin console.
  2. At the top left, click Menu Menu > Account > Admin roles.
  3. Select an existing role with the privilege below, or create a new role and add this privilege:

    Services > Chrome OS > Settings > Manage Printers

  4. Assign this role to the service account email address.

Block or trust a printer management app

Apps are trusted by default, but an administrator can choose to block or trust specific apps for their account.

  1. As an administrator, sign in to the Admin console.
  2. At the top left, click Menu Menu > Security > API Controls.
  3. In the "App access control" section, click Manage Third-party App Access.
  4. In the "Connected apps" section:
    • If you don't see the app listed, click Configure new app. Then, follow the on-screen instructions.
    • If you see the app listed, click the app name. Then, select blocked or trusted under "App Access" and click Save.