OAuth Service Account

Content Type: Module
Categories: Authentication

Overview

Generate a JWT to use with a Google service account to access Google Sheet APIs

Documentation

Description

Generate a JWT to use with a Google service account to access Google Sheets APIs

Typical usage scenario

Google Sheets API with service account

Features and limitations

  • Only works with google sheet API endpoint. To modify this, you must change the scopes in the java action.
  • The generated JWT does not work for normal Oauth2

 

Configuration 

  • You will need to create a google service account by following these steps: 
  1. Setup a new project in Google Cloud Console. You can find more guidelines in this link
     
  2. Select API & Services from the navigation menu, and choose ‘Enabled APIS & services
     
  3. Click on ‘+ ENABLE APIS AND SERVICES’ button on top of the page, this will take you to the API Library.
     
  4. Find the API you need and click ‘Enable’, in this example we are using Google Sheets API to generate a JWT for a service account.
     
  5. Select ‘Credentials’ from the left sidebar. These credentials ensure that you can access the right data and authorize/authenticate your API requests.
     
  6. In “Service Accounts” section at the bottom of the page, click ‘Manage service accounts’
     
  7. Click on ‘+ CREATE SERVICE ACCOUNT’ button on top of the page. Fill the service account details, then click ‘Create and continue’
     
  8. Optional: grant created service account access to your project as an owner.
    And grant users’ access to this service account by typing their emails, then typing the service account email.
     
  9. After you’re done with this process, you will be redirected to the screen that shows your service account. Click on the email of the service account.
     
  10. Go to ‘KEYS’ tab and click ‘ADD KEY’ > Create new key > select JSON key type, then ‘Create’. The JSON file that will be used to generate the JWT will be downloaded. Please note that this file should be saved in a secure place, as it contains sensitive data that can be used to access the google developer console.

 

 

Releases

Version: 1.1.2
Framework Version: 9.12.1
Release Notes: Developer added
Version: 1.1.0
Framework Version: 9.12.1
Release Notes: Documentation, limitations, and roles edited.
Version: 1.0.0
Framework Version: 9.12.1
Release Notes: Initial Version that will generate a JWT to use with a Google service account to access Google Sheets APIs