> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superblocks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authenticate with Google OAuth 2.0

Google provides many public APIs that you can use in Superblocks. Some, like [Google Analytics](/integrations/integrations-library/google-analytics) and [Google Drive](/integrations/integrations-library/google-drive) are available as Superblocks integrations. Others you can connect to using Superblocks [REST API](/integrations/integrations-library/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](https://console.cloud.google.com/apis/credentials)

   ![The Credentials page on Google Cloud Platform's Dashboard](https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google1.png?fit=max\&auto=format\&n=TqcwM8ac6ozIt6Fv\&q=85\&s=42bb9a103300b0308a5a03cd9a58e9a4)

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

   Replace `{tenant}` with the value for your instance from [Instance URLs](/enterprise/instance-urls.md).

   ![Specify Superblocks as authorized JavaScript origin and authorized redirect URI in Google](https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google2.png?fit=max\&auto=format\&n=TqcwM8ac6ozIt6Fv\&q=85\&s=be6dd43bda9234d5805d5d6b7452a7fe)

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

### Configure Superblocks integration

1. Create a [REST API integration](https://app.superblocks.com/integrations/restapiintegration) 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](https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google3.png?fit=max\&auto=format\&n=TqcwM8ac6ozIt6Fv\&q=85\&s=3dea157ea2cffc9bbcc1ff5c8fbbc606)

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](https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google4.png?fit=max\&auto=format\&n=TqcwM8ac6ozIt6Fv\&q=85\&s=97a69594dabac44e205a5ccd3e0ebb58)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.