Skip to main content

Configure Google Sheets API credentials

The agtgsheet connector supports OAuth 2.0, which requires a service account to call Google Sheets API. The service account must be set up in the Google API Console with scope of access granted. In order to connect through Google Sheets API an encryption file also must be generated and saved on the instance server.

  1. Go to Google API Console to create a new service account, or choose an existing account to use.

    Do not use the Google default service accounts.

  2. Assign the service account the "Editor" role.

  3. Enable Google Sheets Domain-wide Delegation on the service account.

  4. Take note of the Client ID for the Service account client that was generated after enabling Google Sheets Domain-wide Delegation. This will be used later.

  5. Create a .P12 "private key" for the service account you are going to use.

  6. Save the generated .P12 file on the instance server.

  7. Take note of the service account ID and private key’s password. They will be used later.

For information on how to create a Google service account, enabling Google service account Domain-wide Delegation, assigning roles, or to generate a .P12 private key, refer to the "Console Help" in the Google API Console.

Your Google administrator may be able to provide the .P12 file and its private key’s password.

Once you have the encryption file, set the permissions to allow the instance to use the API:

  1. Log into the Google Admin console.

  2. In the Manage API client access section, enter:

    1. In the Client Name field, enter the Client ID generated earlier.

    2. In the One or More API Scopes field, enter

    https://www.googleapis.com/auth/spreadsheets.readonly
    https://www.googleapis.com/auth/spreadsheets
    https://www.googleapis.com/auth/drive.readonly
    https://www.googleapis.com/auth/drive
  3. Click Authorize.