Skip to main content

Authenticate with Google OAuth 2.0

Google provides many public APIs that you can use in Superblocks. Some, like Google Analytics, Google Drive, and Google Sheets are available as Superblocks integrations. Others you can connect to using Superblocks REST API Integration.

Google's APIs are authenticated and require that you configure OAuth to connect to them. This guide walks through how to configure an OAuth 2.0 client in Google, and use it in Superblocks to connect to APIs.

Prerequisites

Set up

Create Google OAuth Client

  1. In Google Cloud Console search for the Credentials Page: https://console.cloud.google.com/apis/credentials

    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 https://app.superblocks.com as an "Authorized JavaScript origin"
    4. Add https://app.superblocks.com/oauth/callback as an "Authorized redirect URI"

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

  4. Click Create and copy the Client ID and Client secret

Configure Superblocks Integration

  1. Create a 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

  2. 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