> ## 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)

   <img src="https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google1.png?fit=max&auto=format&n=TqcwM8ac6ozIt6Fv&q=85&s=42bb9a103300b0308a5a03cd9a58e9a4" alt="The Credentials page on Google Cloud Platform's Dashboard" width="2694" height="474" data-path="images/integrations/authentication/google1.png" />

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"

   <img src="https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google2.png?fit=max&auto=format&n=TqcwM8ac6ozIt6Fv&q=85&s=be6dd43bda9234d5805d5d6b7452a7fe" alt="Specify Superblocks as authorized JavaScript origin and authorized redirect URI in Google" title="Specify Superblocks as authorized JavaScript origin and authorized redirect URI in Google" style={{width: "80%"}} width="1110" height="1832" data-path="images/integrations/authentication/google2.png" />

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:

   <img src="https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google3.png?fit=max&auto=format&n=TqcwM8ac6ozIt6Fv&q=85&s=3dea157ea2cffc9bbcc1ff5c8fbbc606" alt="Superblocks Authenticated REST API Configuration" title="Superblocks Authenticated REST API Configuration" style={{width: "80%"}} width="1494" height="2580" data-path="images/integrations/authentication/google3.png" />

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

   <img src="https://mintcdn.com/superblocks/TqcwM8ac6ozIt6Fv/images/integrations/authentication/google4.png?fit=max&auto=format&n=TqcwM8ac6ozIt6Fv&q=85&s=97a69594dabac44e205a5ccd3e0ebb58" alt="A successful call to Google's Spreadsheet API in Superblocks" title="A successful call to Google's Spreadsheet API in Superblocks" style={{width: "80%"}} width="2688" height="2914" data-path="images/integrations/authentication/google4.png" />
