Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 26 additions & 25 deletions admins/connectors/official/google_drive/oauth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,23 @@ checkout the section [here](./service_account).
</Step>

<Step title="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),
- 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**
</Step>

<Step title="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),
- 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**
</Step>

<Step title="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),
- 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**
</Step>

Expand All @@ -48,31 +46,31 @@ checkout the section [here](./service_account).
<img className="rounded-image" src="/assets/admins/connectors/google_drive/GoogleDriveEnableAPI.png" alt="Google Cloud Console enabling Google Docs API for the project"/>
</Step>

<Step title="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 Onyx (or whatever you want)
- For the required emails, use any email of your choice or `founders@onyx.app`
if you wish for the Onyx team to help handle issues.
- Click **SAVE AND CONTINUE**
<Step title="Set up Google Auth Platform">
- Under **APIs & services**, select **Google Auth Platform** (previously
called "OAuth consent screen") - If not configured yet, click **Get started**
- Fill in the **App name** (e.g., `Onyx`) and **User support email**, then
click **Next** - For **Audience**, select **External** if you don't have a Google Organization,
then click **Next** - Fill in your **Developer contact email**, click **Next**, then **Continue**
</Step>

<Step title="Set up scopes">
- In the left sidebar, click **Data Access**
- Click **Add or remove 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`
- Click **Update**, then **Save**

<img className="rounded-image" src="/assets/admins/connectors/google_drive/GoogleDriveScopes.png" alt="OAuth consent screen scopes for Google Drive, Admin SDK, Sheets, and Docs"/>
</Step>

<Step title="Set up test users">
- This is only applicable for users without a Google Organization.
- Typically for a company, Onyx would be set up as an internal app so this step would
not apply.
- Add at least one test user email. Only the email accounts added here will be allowed to
run the OAuth flow to index new documents.
- Click **SAVE AND CONTINUE**, review the changes and click **BACK TO DASHBOARD**
- This is only applicable for users without a Google Organization. - Typically
for a company, Onyx would be set up as an internal app so this step would not apply. - In the left sidebar,
click **Audience**, then scroll down to **Test users** - Click **Add users** and add at least one test user email.
Only the email accounts added here will be allowed to run the OAuth flow to index new documents. - Click **Save**
</Step>

<Step title="Create credentials">
Expand Down Expand Up @@ -106,7 +104,10 @@ First, navigate to the Admin Panel and select the Google Drive connector.
Then, create a new credential, then upload the key you downloaded in the final step. From there,
click **Authenticate with Google Drive** and continue with the account you want to use to index Google Drive.

<img className="rounded-image" src="/assets/admins/connectors/google_drive/OAuthCredential.png" alt="Onyx Google Drive connector showing OAuth credential selection"/>
<img

className="rounded-image" src="/assets/admins/connectors/google_drive/OAuthCredential.png" alt="Onyx Google Drive
connector showing OAuth credential selection" />

Once complete, select the newly created credential, and click the **Continue** button to configure the connector!

Expand Down