Google Sheets API

Enable Google Cloud Platform

  1. Go to gSuite Additional Google services
  2. Search for Google Cloud Platform and click the checkbox
  3. Click on in the blue bar that appears above

Enable Google Drive API

  1. Go to Google Developers Console.
  2. If you see Google Drive API in the list of APIs at the bottom of the screen, click it and skip the remaining steps.
  3. Otherwise, click on ENABLE APIS AND SERVICES.
  4. Search for Google Drive API and click on it.
  5. Click on Enable.

Create API Credentials

  1. Click on CREATE CREDENTIALS
  2. Select the options as shown below:

credentials

  1. Click on What credentials do I need?.
  2. Enter the details similar to shown below (name the service account after the client):

service_account

  1. Click Continue and save the downloaded JSON key file.

Access Google Sheets workbook

  1. Open the Google Sheets workbook that you need to access through APIs.
  2. Open the downloaded JSON key file and look for client_email.
  3. Share the workbook with the client_email address and grant Edit permission.
  4. Uncheck Notify People since this email address is not handled by a human.
  5. Follow the respective API/library documentation for Google Sheets, for authentication and usage.