> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prod.ai/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 Prod AI. Some, like [Google Analytics](https://docs.prod.ai/integrations/integrations-library/google-analytics) and [Google Drive](https://docs.prod.ai/integrations/integrations-library/google-drive) are available as Prod AI integrations. Others you can connect to using Prod AI [REST API](https://docs.prod.ai/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 Prod AI 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/prod-ai/czZGDpuOv3JumSzE/images/integrations/authentication/google1.png?fit=max\&auto=format\&n=czZGDpuOv3JumSzE\&q=85\&s=5c1616fe8b6bfa78f522d9b1e928565e)

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. Under **Authorized redirect URIs**, add the **Callback URL** from the Prod AI integration form
   4. Under **Authorized JavaScript origins**, add the origin of that Callback URL: the scheme and host, without the path

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

### Configure Prod AI integration

1. Create a **REST API integration** in Prod AI (notice the added header). Replace the Client ID and Client Secret with the ones obtained in the previous step:

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

   ![A successful call to Google's Spreadsheet API in Prod AI](https://mintcdn.com/prod-ai/czZGDpuOv3JumSzE/images/integrations/authentication/google4.png?fit=max\&auto=format\&n=czZGDpuOv3JumSzE\&q=85\&s=36dea977a04cecf3c8ea288dff971289)


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