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

# Google Drive OAuth

This guide walks you through connecting Google Drive using an OAuth-enabled Google App. No paid Google Workspace account is needed anyone can follow these steps!

If your organization uses Google Workspace and you'd prefer a Service Account setup instead, refer to this section.

## Authorization

1. **Create a Google Cloud Project** Visit [https://console.cloud.google.com/projectcreate](https://console.cloud.google.com/projectcreate) and create a new project.
2. **Enable Google Drive API**
   * On the left panel, open **APIs & services**
   * Go to **Enabled APIs and services**
   * On the top click **+ENABLE APIS AND SERVICES**
   * Search for **Google Drive API** and click **ENABLE**
   * Alternatively visit this [**link**](https://console.cloud.google.com/flows/enableapi?apiid=drive.googleapis.com), select your project and enable the **Google Drive API**
3. **Enable Admin SDK API**
   * Click on **+ENABLE APIS AND SERVICES** again.
   * Search for **Admin SDK API** and click **ENABLE**
   * Alternatively visit this [**link**](https://console.cloud.google.com/flows/enableapi?apiid=admin.googleapis.com), select your project and enable the **Admin SDK API**
4. **Enable Google Sheets API**
   * Click on **+ENABLE APIS AND SERVICES** again.
   * Search for **Google Sheets API** and click **ENABLE**
   * Alternatively visit this [**link**](https://console.cloud.google.com/flows/enableapi?apiid=sheets.googleapis.com), select your project and enable the **Google Sheets API**
5. **Enable Google Docs API**
   * Click on **+ENABLE APIS AND SERVICES** again.
   * Search for **Google Docs API** and click **ENABLE**
   * Alternatively visit this [**link**](https://console.cloud.google.com/flows/enableapi?apiid=docs.googleapis.com), select your project and enable the **Google Docs API**
     <Frame>
       <img src="https://mintcdn.com/ac-b0a71323/RI3Ga-PnztaN_MVV/images/Arc_xuFtuHxRWK-3.png?fit=max&auto=format&n=RI3Ga-PnztaN_MVV&q=85&s=454730bba608c2b52fdbb5ab2a4628c3" alt="Arc Xu Ftu Hx RWK 3" width="1533" height="653" data-path="images/Arc_xuFtuHxRWK-3.png" />
     </Frame>
6. **Set up OAuth consent screen**
   * Under **APIs & services**, select the **OAuth consent screen** tab
   * If you don’t have a **Google Organization** select **External** for **User Type**
   * Call the app ASSIST AI (or whatever you want)
   * Provide the required support emails of your choice.
   * Click **Save and Continue**.
7. **Set up scopes**
   * Add the scope `.../auth/drive.readonly` for `Google Drive API`
   * Add the scope `.../auth/drive.metadata.readonly` for `Google Drive API`
   * Add the scope `.../auth/admin.directory.user.readonly` for `Admin SDK API`
   * Add the scope `.../auth/admin.directory.group.readonly` for `Admin SDK API`
     <Frame>
       <img src="https://mintcdn.com/ac-b0a71323/RI3Ga-PnztaN_MVV/images/new1.avif?fit=max&auto=format&n=RI3Ga-PnztaN_MVV&q=85&s=f7b8d67fce3f53f6413a0d5e5973be6e" alt="New1" width="840" height="932" data-path="images/new1.avif" />
     </Frame>
8. **Add Test Users**
   * Add at least one test user email *(only if you don't have a Google Organization)* — only these accounts will be permitted to run the OAuth flow and index documents.
   * Click **Save and Continue**, review your settings, then return to the dashboard.
9. **Create OAuth Credentials**
   * Go to the **Credentials** tab and select **+ Create Credentials → OAuth Client ID**
     <Frame>
       <img src="https://mintcdn.com/ac-b0a71323/RI3Ga-PnztaN_MVV/images/2-3.png?fit=max&auto=format&n=RI3Ga-PnztaN_MVV&q=85&s=97990d025c29caaf5d0ea2989a79a983" alt="2 3" width="1920" height="1032" data-path="images/2-3.png" />
     </Frame>
   * Choose **Web Application** and give it a name like `AssistAIConnector`.
   * Then configure the following:
     * **Authorized JavaScript Origins**
     * `https://www.tryassist.in/forassist` (ASSIST AI Cloud)
   * **Authorized Redirect URIs:**
     * `https://www.tryassist.in/admin/connectors/google-drive/auth/callback`\
       for ASSIST AI cloud

Click **Create**, then download the credentials JSON file from the Client Secret panel — you'll need it in the next step.

## Indexing

Navigate to the Admin Panel and select the **Google Drive connector**. Create a new credential and upload the JSON key downloaded in the previous step. Click **Authenticate with Google Drive** and sign in with the account you'd like to use for indexing.

Once complete, select the newly created credential and click **Continue** to finish configuring the connector.

<Note>
  If you plan on using permission syncing for this connector, the account performing the OAuth flow must have an Admin role in the Google Workspace that has access to the following:

  * Admin console privileges -> Services -> Drive and Docs -> Settings
  * Admin API privileges -> Users -> Read
  * Admin API privileges -> Groups -> Read
  * Admin API privileges -> Organization Units -> Read

  This can be set by an admin in the admin panel of the Google Workspace under Account > Admin roles.
</Note>
