Skip to main content

Authenticating with Google OAuth 2.0

This guide will walk you through creating a Google Sheets REST API integration in Superblocks to demonstrate how to use a REST API that's authenticated with the OAuth 2.0 Authentication Code grant type.

1) In Google Cloud Console search for the Credentials Page:

The Credentials page on Google Cloud Platform's Dashboard

2) Click on "Create Credentials" and select "OAuth client ID"

3) Configure your credentials:

  1. Select the "Web application" application type
  2. Choose a name for your credentials
  3. Add as an "Authorized JavaScript origin"
  4. Add as an "Authorized redirect URI"

Specify Superblocks as authorized JavaScript origin and authorized redirect URI in Google

4. Click "Create" and take note of the client ID and client secret.

5. Create a new REST API integration in Superblocks (notice the added header). Replace the Client ID and Client Secret with the ones obtained in the previous step:

Superblocks Authenticated REST API Configuration

6. Now you can use the integration in a Superblocks App to access your Google Sheets data using Google's Sheets REST API:

A successful call to Google's Spreadsheet API in Superblocks