Skip to main content

Stremio GDrive

Description

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.

Configuration

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, not from the setup page.

Setting up our Google App

  1. Go to the Google Cloud Console.

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

    Google Cloud Console

  2. Create a new project and select it:

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

      Create a new project

    2. Click on New Project:

      Create a new project

    3. Enter a project name and click on Create:

      Create a new project

      • 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

      • Click Select Project.
      note

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

  3. Setup our Google Auth Platform

    1. Go to the Google Cloud Console.

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

      Google OAuth Platform

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

      Google OAuth Platform

    4. Fill in the form:

      Google OAuth Platform

      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.

    2. In the search bar at the top, search for Google Drive API and click on the result:

      Google Drive API

    3. Click on Enable:

      Google Drive API

  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

    3. Fill in the form:

      Google OAuth Platform

      • Application Type: Set this to Web application.
      • Name: You can set this to anything such as Stremio GDrive.
      • Authorized redirect URIs: Set this to
    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

Setting up the Cloudflare Worker

  1. Go to the Cloudflare Workers 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

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

    Cloudflare Workers

  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

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

    Cloudflare Workers

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

    Cloudflare Workers

  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.

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

      Google OAuth Platform

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

      Google OAuth Platform

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

      Google OAuth Platform

    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 OAuth Tool

    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.

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

    2. 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.

    3. Go back to the Cloudflare Worker editor and after removing the existing code, paste the code you copied.

    4. Your code should look something like this:

      Cloudflare Workers

  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.

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