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

# GoogleDrive Partner OAuth

> To integrate the GoogleDrive with StackOne, please follow these essentials steps

## Log in to Google Cloud Console

Log in to your Google Cloud Console at [https://console.cloud.google.com](https://console.cloud.google.com)

<Frame>
  <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Log in" src="https://mintcdn.com/stackone-60/-KFzzx2Rt3VBB1He/images/googledrive/image1.png?fit=max&auto=format&n=-KFzzx2Rt3VBB1He&q=85&s=e5588dff54db11b18a07697cf3ccb04e" width="3294" height="1616" data-path="images/googledrive/image1.png" />
</Frame>

## Create or Select a project

Create a new project or select an working project from projects list.

<Frame>
  <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Create or select project" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image2.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=35c278da341b83748ad59e233713a875" width="1800" height="866" data-path="images/googledrive/image2.png" />
</Frame>

## Configure Google OAuth

<Steps>
  <Step title="Navigate to OAuth consent screen">
    In the left navigation menu, click **APIs & Services > OAuth consent screen**

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Navigate to OAuth consent screen" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image3.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=0a1d226692f33bd7055e98eb972217cd" width="1267" height="913" data-path="images/googledrive/image3.png" />
    </Frame>
  </Step>

  <Step title="Configure Google Auth platform">
    Click on **GET STARTED** button in OAuth Overview page.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image4.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=411a59d5c2455b6b22688cc54ed6522e" width="1883" height="885" data-path="images/googledrive/image4.png" />
    </Frame>
  </Step>

  <Step title="Enter App details">
    Enter the App name and User support email, then click on next button

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image5.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=2719fb42ad071c4fd96db730b7d6f509" width="1870" height="750" data-path="images/googledrive/image5.png" />
    </Frame>
  </Step>

  <Step title="Select Audience type">
    Select Audience type and click next button

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image6.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=ad95f90b32dca117e548c40ed1b4ade1" width="1908" height="861" data-path="images/googledrive/image6.png" />
    </Frame>
  </Step>

  <Step title="Enter Contact information">
    Enter contact email address and click on next button

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image7.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=ced9e7a1d853567202ea8f1070440005" width="1912" height="780" data-path="images/googledrive/image7.png" />
    </Frame>
  </Step>

  <Step title="Finish the configuration process">
    Read the Google policies and click on Checkbox, then click on create button to finish.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image8.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=9f23764f0be7d922cd629fb9aeaebf0f" width="1874" height="699" data-path="images/googledrive/image8.png" />
    </Frame>
  </Step>

  <Step title="Select Required Application Scopes">
    Click the **Add or Remove Scopes** button, and a popup window will appear on the right titled *Update selected scopes*.

    Enable the following scope which is required for full functionality of this integration:

    * `https://www.googleapis.com/auth/drive.file`

    You can copy and paste the scope into the **Filter** bar to quickly locate them.

    Once the scope have been enabled, click the **Update** button to proceed.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Update Scopes Button" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image9.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=4d9c8b4aba71ea3c444013869e13cd79" width="1911" height="946" data-path="images/googledrive/image9.png" />
    </Frame>
  </Step>
</Steps>

## Generate OAuth2 Client Credentials

<Steps>
  <Step title="Navigate to OAuth Clients">
    In the left navigation menu, click **Google Auth Platform > Clients**

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Navigate to OAuth Clients" src="https://mintcdn.com/stackone-60/-KFzzx2Rt3VBB1He/images/googledrive/image10.png?fit=max&auto=format&n=-KFzzx2Rt3VBB1He&q=85&s=663d31146282d65ca495fca28e485c76" width="906" height="1782" data-path="images/googledrive/image10.png" />
    </Frame>
  </Step>

  <Step title="Create Client">
    Click on **CREATE CLIENT** button to create OAuth Client app

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Create Client" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image11.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=2d9ffde071484c980b26d3dfef830d99" width="1908" height="476" data-path="images/googledrive/image11.png" />
    </Frame>
  </Step>

  <Step title="Enter Client App details">
    Select **Web application** from Application type dropdown, Enter the Client App name and redirect URL as `https://api.stackone.com/connect/oauth2/googledrive/callback`, then click on CREATE button

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Enter Client App details" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image12.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=b99a24846c54f1e437a1edfe2c308df6" width="1897" height="950" data-path="images/googledrive/image12.png" />
    </Frame>
  </Step>

  <Step title="Copy Client Credentials">
    Select you Client App from the the displayed **OAuth 2.0 Client IDs** list. Copy and store Client ID and Client Secret to be used in later steps.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Copy Your Domain" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image13.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=f1ade2d1ef44b58c5039279b7f9eba74" width="1901" height="923" data-path="images/googledrive/image13.png" />
    </Frame>
  </Step>
</Steps>

## Enable the Google Drive API

Google requires manually enabling APIs for your account. The [Google Drive API](https://developers.google.com/drive) provides the underlying endpoints for this Documents connection.

<Steps>
  <Step title="Navigate to the API Library">
    In the left navigation menu, click **APIs & Services > Library**

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Navigate to the API Library" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image14.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=116d7ba4c7ccfa8efbf154505cb9eafa" width="938" height="1680" data-path="images/googledrive/image14.png" />
    </Frame>
  </Step>

  <Step title="Locate the Google Drive API">
    Using the search bar, enter a search for *"Google Drive"*. Click the **Google Drive API** result.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Locate the Admin SDK API" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image15.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=a981eeedc4786366ab5d140a3889aec1" width="1339" height="928" data-path="images/googledrive/image15.png" />
    </Frame>
  </Step>

  <Step title="Enable the Google Drive API">
    Click the **Enable** button to enable the Google Drive API for your organization.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Enable the Admin SDK API" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image16.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=83c9381f214ed5163c0f29ae75755443" width="1050" height="933" data-path="images/googledrive/image16.png" />
    </Frame>
  </Step>

  <Step title="Locate the Google Picker API">
    Similar as above, using the search bar, enter a search for *"Picker API"*. Click the **Google Picker API** result.

    <img src="https://mintcdn.com/stackone-60/-KFzzx2Rt3VBB1He/images/googledrive/google-drive-picker-api-list.png?fit=max&auto=format&n=-KFzzx2Rt3VBB1He&q=85&s=a8158e95454e4f2835eef042f1093041" alt="Google Drive Picker Api List Pn" width="1139" height="565" data-path="images/googledrive/google-drive-picker-api-list.png" />
  </Step>

  <Step title="Enable the Google Picker API">
    Click the **Enable** button to enable the Google Picker API for your organization.

    <img src="https://mintcdn.com/stackone-60/-KFzzx2Rt3VBB1He/images/googledrive/google-picker-api-enable.png?fit=max&auto=format&n=-KFzzx2Rt3VBB1He&q=85&s=463a4ee956f18c4454f48e3a13bf2fe7" alt="Google Picker Api Enable Pn" width="1049" height="703" data-path="images/googledrive/google-picker-api-enable.png" />
  </Step>
</Steps>

## To Enable and Connect the Integration

<Steps>
  <Step title="Enable GoogleDrive">
    Navigate to the Documents category on the Integrations page and enable GoogleDrive.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Enter Credentials" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image17.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=81ee6e887dd051da716d509812130d39" width="3412" height="1528" data-path="images/googledrive/image17.png" />
    </Frame>
  </Step>

  <Step title="Enter Credentials">
    Please complete the necessary fields in the **GoogleDrive - Configuration** model:

    * **Authentication Type** - Please select the **OAuth2 - Google Drive Partner Credentials** to integrate with the Google Drive Partner.
    * **Client ID**
    * **Client Secret**
    * **Scopes** - If you selected only the required scopes in the previous steps, leave the default value for this field. Otherwise, enter the space-separated list of scopes granted to your application.
    * **Redirect URI** - (optional) - If you are using your own OAuth2 credentials, enter the redirect URI that you configured in the Google Cloud Console. Otherwise, leave this field blank. For more information, see [OAuth Proxy Redirect](/integration-guides/oauth-proxy-redirect).

    Proceed by clicking the Save Changes button.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Enter Credentials" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image18.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=3563519c27514664b04e3b22a46622bb" width="546" height="1338" data-path="images/googledrive/image18.png" />
    </Frame>
  </Step>

  <Step title="Connect to GoogleDrive">
    Click the Connect button to start the login process. You will be redirected to Google Drive.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Connect to GoogleDrive" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image19.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=6b4eef765ad242d613fcdf0b47e1cfd8" width="998" height="1472" data-path="images/googledrive/image19.png" />
    </Frame>
  </Step>

  <Step title="Grant OAuth Application Consent">
    A window will appear and may prompt you to log in to your Google Drive account.

    After logging in, you will be displayed the OAuth consent screen you configured.

    Click the **Allow** button to grant the application access to your Google Drive account.

    <Frame>
      <img className="rounded-md" style={{ margin:"0 auto",border:"1px solid #efefef" }} alt="Grant OAuth Application Consent" src="https://mintcdn.com/stackone-60/POgdaSWWHjUFRYuz/images/googledrive/image20.png?fit=max&auto=format&n=POgdaSWWHjUFRYuz&q=85&s=69717559777e4df7c415388a1bed855f" width="1704" height="1508" data-path="images/googledrive/image20.png" />
    </Frame>
  </Step>
</Steps>
