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

# Google Drive

# Connector Details

| Name        | Value                                                                                                                                                                                                                                                                                                             |
| :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Platform    | [Google Drive](https://drive.google.com)                                                                                                                                                                                                                                                                          |
| Auth Type   | OAuth                                                                                                                                                                                                                                                                                                             |
| Direction   | Read                                                                                                                                                                                                                                                                                                              |
| Tap Repo    | [https://github.com/hotgluexyz/tap-google-drive](https://github.com/hotgluexyz/tap-google-drive)                                                                                                                                                                                                                  |
| Tap Metrics | <p>Usage: <Tooltip tip="low"><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#A9A9A9" size="14px" /><Icon icon="user" iconType="regular" color="#A9A9A9" size="14px" /></Tooltip></p> |

# Setting up the Google Drive File Picker integration

## Create a Google Cloud Project

To use the Google Drive connector, first [create a Google Cloud Console project](https://console.cloud.google.com/projectcreate) and

<Frame caption="Create a project at https://console.cloud.google.com/projectcreate">
  <img src="https://mintcdn.com/hotglue/9lYhXJtLxmXXxTjD/connectors/images/GDriveCreateProject.png?fit=max&auto=format&n=9lYhXJtLxmXXxTjD&q=85&s=5111424c9e55694ff898f2daad823130" width="620" height="309" data-path="connectors/images/GDriveCreateProject.png" />
</Frame>

## Enable the Google Picker API

Next navigate to the **Enabled APIs & Services** menu:

<img src="https://mintcdn.com/hotglue/9lYhXJtLxmXXxTjD/connectors/images/GDriveEnabledAPIs.png?fit=max&auto=format&n=9lYhXJtLxmXXxTjD&q=85&s=19f05770bfe3a30c2ddc25060cf90b0b" width="709" height="677" data-path="connectors/images/GDriveEnabledAPIs.png" />

Press **+ Enable APIs & Services** and enable the `Google Picker` API. This allows your OAuth application to download files that your tenant explicitly gives you access to.

## Creating an OAuth application

Next, navigate to the [Google Auth Platform](https://console.cloud.google.com/auth/overview) to create your OAuth application.

<img src="https://mintcdn.com/hotglue/9lYhXJtLxmXXxTjD/connectors/images/GoogleOAuthApp.png?fit=max&auto=format&n=9lYhXJtLxmXXxTjD&q=85&s=c44cc83597d1d7cbcf7d8277272fe6e8" width="1134" height="679" data-path="connectors/images/GoogleOAuthApp.png" />

Create an external application with the support emails that you would like to surface to your tenants.

Next create an OAuth client with the callback `https://hotglue.xyz/callback`:

<img src="https://mintcdn.com/hotglue/9lYhXJtLxmXXxTjD/connectors/images/CreateGoogleClientID.png?fit=max&auto=format&n=9lYhXJtLxmXXxTjD&q=85&s=5b00c64600449a110a011a3f1f1e286f" width="899" height="816" data-path="connectors/images/CreateGoogleClientID.png" />

Make sure to copy your client id and secret to be later used in the hotglue dashboard.

Finally, navigate to the **Audience** tab to publish your application. Note that until the application is verified by google, your tenants will see a warning before authenticating.

## Generating a client side developer token

In order to use Google's client-side file picker, you'll need to generate a developer token for the hotglue widget to use.

On the lefthand sidebar, navigate to **APIs & Services > Credentials**.

Next press **+ Create Credentials** > **API key** to get an API key. Once its generated, we recommend restricted its scope to just the Google Picker API.

## Getting your App ID

Finally, in order to support the Google Picker API, hotglue requires your Google Cloud project number (AKA `app id`). You can find the file picker by navigating to the hot dog icon in the top right corner and pressing project settings.

## Configuring Google Drive connector in hotglue

### Authorization URL

The proper authorization url for the Google Picker API is:

```
"https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/drive.file&access_type=offline&prompt=consent&include_granted_scopes=true&response_type=code"
```

If using Google Drive in a unidirectional (v1) flow, you can configure this by adding the following to your Google Drive [availableSource](/key-concepts/connectors/v1-sources/management):

```json theme={null}
"tap_url": "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/drive.file&access_type=offline&prompt=consent&include_granted_scopes=true&response_type=code"
```

If using Google Drive in a bidirectional (v2) flow, you can add the following to your [availableConnector](/key-concepts/connectors/v2-connectors/management):

```json theme={null}
"auth_url": "https://accounts.google.com/o/oauth2/v2/auth?scope=https%3A//www.googleapis.com/auth/drive.file&access_type=offline&prompt=consent&include_granted_scopes=true&response_type=code"
```

### Configuring your Google Console application for the widget

To support using the Google Picker API in the widget, you can add the following to your availableSource or availableConnector:

```json theme={null}
"google_tokens": {
   "app_id": "<Your Project Number / App Id>",
   "api_key": "<Your Google Cloud Client-Side API Key>"
 },
```
