---
title: Stremio GDrive
description: Stremio addon for fetching videos from your google drive.
keywords:
  [
    stremio,
    addons,
    http,
    google drive,
    guide,
    setup,
    configuration,
    install,
    link,
  ]
tags:
  [stremio-addon, stremio-addon:http-streams, stremio-addon:viren070's-addons]
toc_max_heading_level: 2
---

import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import Details from "@theme/Details";
import { CallBackUrl } from "@site/src/components/GoogleOAuth/Callback";
import Link from "@docusaurus/Link";

```mdx-code-block
import StremioAddonButtons from '@site/src/components/StremioAddonButtons';

<StremioAddonButtons id="stremio-gdrive" source="https://github.com/Viren070/stremio-gdrive-addon"/>
```

<h3>Description</h3>

Stremio-gdrive is a self-hosted Stremio addon that allows you to view files from Google Drive.

For it to work, you will need to join some team drives. You can find some [here](https://t.me/s/teamdrives).

<h3>Configuration</h3>I will go through the steps to set up this addon through a
Cloudflare Worker.

:::tip
**This guide should be followed on its [dedicated page](/stremio/addons/stremio-gdrive), not from the setup page.**

:::

<h4>Setting up our Google App</h4>

1. Go to the [Google Cloud Console](https://console.cloud.google.com/).

   If this is your first time using Google Cloud, you will be prompted to agree to the terms of service:

   ![Google Cloud Console](/img/stremio/gdrive/google_cloud_onboarding.png)

2. Create a new project and select it:

   <Details summary="How?">

   1. Click on `Select a project` in the top left:

      ![Create a new project](/img/stremio/gdrive/google_cloud_create_project_1.png)

   2. Click on `New Project`:

      ![Create a new project](/img/stremio/gdrive/google_cloud_create_project_2.png)

   3. Enter a project name and click on `Create`:

      ![Create a new project](/img/stremio/gdrive/google_cloud_create_project_3.png)

      - The project name can be anything you want, e.g., `Stremio-Gdrive`. Leave the `Organization` field blank.

   4. Once the project has been created, you will get a notification:

      ![Create a new project](/img/stremio/gdrive/google_cloud_create_project_4.png)

      - Click `Select Project`.

      :::note
      You may also use the same dropdown from step i to select the project.
      :::

   </Details>

3. Setup our Google Auth Platform

   1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
   2. In the search bar at the top, search for `Google Auth Platform` and click on the result:

      ![Google OAuth Platform](/img/stremio/gdrive/google_cloud_oauth_search_results.png)

   3. You should be met with a message telling you that `Google Auth Platform not configured yet`, click on `Get Started`:

      ![Google OAuth Platform](/img/stremio/gdrive/google_auth_platform_0.png)

   4. Fill in the form:

      ![Google OAuth Platform](/img/stremio/gdrive/google_auth_platform_1.png)

      1. `App Information`:
         - Set `App Name` to `Stremio GDrive`.
         - Set `User Support Email` to your email. It should appear in the dropdown.
      2. `Audience`:
         - Set `User Type` to `External`.
      3. `Contact Information`
         - Add any email address, you can use the same one you used earlier for `User Support Email`.
      4. `Finish`
         - Check the box to agree to the `Google API Services: User Data Policy`

   5. Once you have filled in the form, click on `Create`

4. Enable the Google Drive API.

   1. Go to the [Google Cloud Console](https://console.cloud.google.com/).
   2. In the search bar at the top, search for `Google Drive API` and click on the result:

      ![Google Drive API](/img/stremio/gdrive/google_cloud_gdrive_api_search_results.png)

   3. Click on `Enable`:

      ![Google Drive API](/img/stremio/gdrive/google_cloud_gdrive_api.png)

5. Create an OAuth client.

   1. Go back to the `Google Auth Platform` page.
   2. Click on `Clients` in the sidebar and then click on `+ Create Client`:

      ![Google OAuth Platform](/img/stremio/gdrive/google_cloud_auth_platform_clients.png)

   3. Fill in the form:

      ![Google OAuth Platform](/img/stremio/gdrive/google_cloud_auth_platform_clients_form.png)

      - `Application Type`: Set this to `Web application`.
      - `Name`: You can set this to anything such as `Stremio GDrive`.
      - `Authorized redirect URIs`: Set this to <CallBackUrl />

   4. Click on `Create`.

6. Publish the app.

   1. Go back to the `Google Auth Platform` page.
   2. Click on `Audience` in the sidebar and then click on `Publish`:

      ![Google OAuth Platform](/img/stremio/gdrive/google_cloud_auth_platform_publish.png)

<h4>Setting up the Cloudflare Worker</h4>

1. Go to the [Cloudflare Workers](https://workers.cloudflare.com/) page and click `Log In` or `Sign Up` if you don't have an account.

2. Once logged in, you should be taken to the Cloudflare Workers & Pages dashboard. Click on `Create`:

   ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_workers_pages_overview.png)

3. Once on the create page, make sure you're on the `Workers` tab and click `Create Worker`:

   ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_create_an_application_workers.png)

4. You'll be asked to give a name to your worker. You can name it anything, this will be the URL you enter into Stremio to access your addon. Click `Deploy` once named.

   ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_create_a_worker.png)

5. Once its done being deployed, you should be shown a success message. Click the `Edit code` button:

   ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_create_a_worker_success.png)

6. You should be taken to the Cloudflare Worker editor:

   ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_worker_editor.png)

7. Now, we need to obtain the code for the addon that we will use specific to our Google Drive.
   First, we need to obtain our `Client ID` and `Client Secret` from the Google Cloud Console.

   1. Go to the [Google Cloud Console](https://console.cloud.google.com/).

   2. In the search bar at the top, search for `Google Auth Platform` and click on the result:

      ![Google OAuth Platform](/img/stremio/gdrive/google_cloud_oauth_search_results.png)

   3. Click on `Clients` and click on the download icon for the client you created earlier:

      ![Google OAuth Platform](/img/stremio/gdrive/google_auth_platform_clients_download.png)

   4. A pop-up will appear with your `Client ID` and `Client Secret`.

      ![Google OAuth Platform](/img/stremio/gdrive/google_auth_platform_clients_download_menu.png)

   5. You can click the copy icons to copy the `Client ID` and `Client Secret` to your clipboard for the next step.

8. Now, we can get the code for the Cloudflare Worker.

   1. Go to the <Link to="/oauth/google" target="_blank" >OAuth Tool</Link>

   2. Fill in the form with the `Client ID` and `Client Secret` from the previous step.

   3. Click `Authorise`

   4. Sign in with your Google account and allow the app to access your Google Drive.
      :::tip
      You may encounter a warning page saying `Google hasn't verified this app`, click on `Advanced` and then `Go to... (unsafe)`.

   This warning is because the app is not verified by Google. This is normal for self-hosted apps.
   :::

   5. You will be redirected back to the OAuth Tool with a success message. Click `Get Addon Code`.

   6. You should be shown another success message. Then, make sure you're on the `Viren070` tab and you should see a block of code. Copy this code.
   7. Go back to the Cloudflare Worker editor and after removing the existing code, paste the code you copied.

   8. Your code should look something like this:

      ![Cloudflare Workers](/img/stremio/gdrive/cloudflare_finished_worker_script.png)

9. Click `Deploy` in the top right to save your changes and deploy the worker.

10. Once deployed, you should see a green success message at the bottom. Click `Visit` next to the deploy button to go to the addon URL.

11. You should be redirected to the /manifest.json. if not, append `/manifest.json` to the URL in the address bar.

12. Copy the URL and [add it to Stremio](/stremio/faq#how-do-i-install-an-addon-manually).

Done! You have now set up your own addon which will allow you to stream videos from your drives and team drives.
