Documentation

How to set up Drive Downloads Pro with Google Drive

Step-by-step guide (APIs + plugin settings)

Drive Downloads Pro connects your WooCommerce downloadable products with Google Drive and automatically manages file and folder access based on the order status (completed, cancelled, refunded, etc.).

In this guide, you’ll see:

  • What you need before getting started
  • How to create credentials in Google Cloud
  • How to connect the plugin with your Google Drive account
  • Which permission and security settings are recommended
  • How to use the Google Drive picker inside WooCommerce
  • Common issues and how to fix them

1. Requirements before getting started

Before configuring anything, make sure you have:

  • A domain with HTTPS (the green padlock). Google OAuth does not work without SSL.
  • WordPress + WooCommerce installed and active.
  • Access to Google Cloud Console to create credentials.
  • A Google account with access to the Google Drive folders where you will store your content (downloads, courses, client material, etc.).

Important: all content you want to deliver must be in the same Google Drive account that you will connect with the plugin.


2. Create credentials in Google Cloud

2.1 – Create or choose a project

  1. Go to: https://console.cloud.google.com
  2. At the top, click Select project.
  3. Create a new project (for example, “WooCommerce Drive”) or choose an existing one.
  4. Make sure it stays selected for the following steps.

2.2 – Enable the required APIs

  1. In the left menu, go to APIs & Services → Library.
  2. Search for and enable these APIs:
    • Google Drive API
    • Google Picker API

Both must be set to Enabled.

2.3 – OAuth consent screen

  1. Go to APIs & Services → OAuth consent screen.
  2. User type: usually External.
  3. Fill in the basic information:
    • Application name (e.g. “Drive Downloads Pro – My store”).
    • Support email.
    • Domain (if you have it configured).
  4. Under Authorized domains, add your domain, for example:
    yourdomain.com
  5. In Scopes, add access to Google Drive.
  6. Save the changes.

Note: for internal use or test mode, full Google verification is usually not required.

2.4 – Create OAuth credentials (Client ID and Client Secret)

  1. Go to APIs & Services → Credentials.
  2. Click Create credentials → OAuth client ID.
  3. Application type: Web application.
  4. In Authorized JavaScript origins, add:
    • https://yourdomain.com
    • Any other domains/subdomains you use (for example, a staging site or a different admin URL).
  5. In Authorized redirect URIs, paste the redirect URL shown by the plugin in its settings (the “Default redirect URL”).
    • Just copy/paste that URL exactly as it appears in the plugin.
  6. Click Create and save safely:
    • Client ID
    • Client Secret

You will need them in the plugin settings.

2.5 – Create the API Key for Google Picker

  1. From Credentials, click Create credentials → API key.
  2. A new API key will be created. Click Edit to restrict it.
  3. Restriction type: Websites (HTTP referrers).
  4. Add at least these patterns:
    • https://yourdomain.com/wp-admin/*
    • https://yourdomain.com/*
  5. Save the changes. This API key will be used in the browser to display the Google Drive selector (Google Picker).

3. Configure Drive Downloads Pro in WordPress

Once the plugin is activated, you’ll see a new menu in the WordPress admin called Drive Downloads Pro.

From there you can:

  1. Connect your site with your Google Drive account.
  2. Adjust how file and folder access is managed when orders change status.

3.1 – Connect with Google Drive (Connection block)

At the top you’ll see a card with the connection status:

  • Connected / Not connected
  • Connected Drive account (name and email)
  • Action buttons:

Main buttons:

  • Connect with Google – opens the Google window to authorize your site’s access to your Drive.
  • Disconnect – disconnects the current account.
  • Test connection – checks that everything is configured correctly (tokens, APIs, permissions).
  • Additional options to reset tokens or revoke access in Google, if needed.

Recommendation: when you finish the configuration, click Test connection to confirm that your site is communicating correctly with Google Drive.

3.2 – Google OAuth & API section

In this section you enter the Google Cloud details:

  • Google Client ID
  • Google Client Secret
  • Google Picker API key

The plugin securely stores them so it can communicate with Google Drive.

You will also see the Default redirect URL that must be used as an “Authorized redirect URI” in Google Cloud.
If you don’t need a custom redirect, leave the “Custom redirect URL” field empty and let the plugin handle it.

3.3 – Google Drive content & selection settings

These settings control what you can see in the picker and how selection behaves globally:

  • Default customer access in Google Drive – default role customers will have on folders/files:
    • Viewer – view only (recommended for most cases).
    • Commenter – they can comment.
    • Editor – they can edit (use only when necessary).
  • Only allow Gmail addresses – if enabled, access is only granted when the billing email is @gmail.com or @googlemail.com. Otherwise, the plugin logs a note in the order and does not grant access.
  • By default, limit folder selection to top-level folders in “My Drive” for all products – when enabled, the picker will only allow selecting top-level folders (no nested folders) on a global level.
  • Show “Shared with me” content from Google Drive – enable this if you also want to select items that are shared with your account (not only those you own).
  • Allowed Google Drive content for selection:
    • Only folders
    • Only files
    • Folders and files

    Choose the option that matches how you organize your content in Drive.

3.4 – Order-based access & permission policy

These options control who receives access when an order is marked as Completed in WooCommerce and how secure that access is.

  • Who receives access when the order is completed:
    • Customer only (buyer email – private access) – Drive permissions are granted to the billing email of the order.
    • Anyone with the link (public access) – the folder/file is shared as “anyone with the link”.
  • Allow the shared item to be discoverable in Google Drive search – only for public links; enable only if you really need internal discoverability.
  • Send a Google email notification when access is granted – Google sends an email to the customer when permissions are added.
  • For viewer access, block download and copy inside Google Drive where supported – extra protection to avoid easy redistribution of your content.
  • Additional message in the Google notification email – extra text that will appear in the email sent by Google when access is granted.

3.5 – Per-product settings (Drive Pro tab)

Inside each WooCommerce product you’ll see a section or tab related to Drive Downloads Pro (for downloadable products):

  • Default download name – the label that appears in the downloads table (can be customized per product).
  • Only use top-level folders – when enabled for a specific product, only top-level folders from “My Drive” can be used. Nested folders or shared items will be rejected when selected.
  • Customer access in Google Drive – allows you to override the default role for this product:
    • Use default (view only)
    • Read only
    • Read and adding comments
    • Read and edit files
  • Restrict download / copy for this product – override the global setting that blocks download and copy for viewers in Google Drive.
  • Allow editors to reshare for this product – override whether editors in Google Drive can reshare this content with others.
  • Google notification email for this product – override whether Google sends a notification email when access is granted for this product.
  • Custom notification message for this product – optional message to include in the Google notification email just for this product. Leave empty to use the global message.

4. Recommended permission and security settings

These are practical recommendations for a secure and predictable setup.

4.1 – Basic permissions

Recommended global role: Viewer (view only). It’s ideal for courses, resource libraries, and digital downloads.

  • Use Commenter only if students or clients need to comment directly on documents.
  • Use Editor only when customers must actively edit files.

Only allow Gmail addresses:

  • Enable if your audience mainly uses personal Gmail accounts and you want stricter control.
  • When a non-Gmail email buys, the plugin will not grant access and will leave a note in the order, so you can handle it manually if you want.

4.2 – Content visibility and picker options

  • Set Allowed content to “Only folders” if each product corresponds to a Drive folder (recommended in many setups).
  • Enable Show “Shared with me” only if your structure relies heavily on items shared from other accounts.
  • Use By default, limit folder selection to top-level folders if you want a clean, simple structure where each product corresponds to a main folder in “My Drive”.

4.3 – Access behaviour when orders change

  • When an order is Completed, the plugin grants access according to your global and product-level settings.
  • When an order is cancelled, refunded, or trashed, the plugin attempts to revoke the permissions it created for that order.

5. How to use the picker in your WooCommerce products

Once everything is configured:

  1. Edit or create a downloadable product in WooCommerce.
  2. Tick the “Downloadable” checkbox.
  3. In the downloadable files section, you’ll see buttons like:
    • Choose Drive folder
    • Choose Drive file
    • Choose from Drive (depending on your settings).
  4. Click the button and the Google Drive picker will open.
  5. Select the folder or file that contains the content to deliver (course, resources, client material, etc.).

After you select, the plugin will automatically fill:

  • The download name (you can edit it).
  • The Google Drive resource URL.

In the downloads table you’ll see an indicator such as:

  • Selected from Google Drive
  • Type: Folder or File
  • A link to Open in Google Drive
  • If there are multiple entries, a label like “+X more items selected”

When an order is marked as Completed, the plugin will:

  • Update the file or folder permissions in Drive according to your settings.
  • Grant access to the customer email (private) or set “anyone with the link” (public), depending on your configuration.

If the order is cancelled, refunded, or trashed, the plugin will attempt to revoke those permissions from Google Drive.


6. Recommended settings based on business type

Scenario A: Selling courses or digital products to end customers

  • Who receives access: Customer only (buyer email – private access)
  • Default role: Viewer
  • Only allow Gmail addresses: Optional; enable only if your audience is mainly on Gmail.
  • Restrict download/copy: Enabled (for extra protection).
  • Email notifications: Enabled (customers receive a clear Google invitation).

Scenario B: Resource packs or low-sensitivity downloads

  • Who receives access: Anyone with the link (public access)
  • Default role: Viewer
  • Search discovery: Usually disabled (to avoid unnecessary visibility).
  • Notifications: Optional (public links do not need per-user invitations).

Scenario C: Client work with shared folders

  • Who receives access: Customer only (billing email)
  • Default role: Viewer or Editor (depending on whether clients must upload/modify files).
  • Restrict download/copy: Enabled if you want to make redistribution harder.

7. Common problems and quick fixes

  1. The “Connect with Google” button can’t be clicked
    → There is already an account connected. Click Disconnect and connect again.
  2. Google Picker shows an “origin mismatch” error or doesn’t load
    → The API key is not properly restricted. Check in Google Cloud that the HTTP referrers include:

    • https://yourdomain.com/wp-admin/*
    • https://yourdomain.com/*
  3. Error “redirect_uri_mismatch”
    → The redirect URL you entered in Google Cloud does not match the one shown by the plugin.

    • Copy the Default redirect URL again from the plugin settings and paste it into Google Cloud.
  4. Error “invalid_grant”
    → Google has invalidated the connection (password change, manual revocation, etc.).

    • Use the option in the plugin to reset tokens or the connection.
    • Click Connect with Google again and complete the process.
  5. You don’t see Shared drives in the picker
    → Make sure the connected account has access to the drives and that the Drive API is enabled in Google Cloud.
  6. Customer didn’t get access after payment
    → Check these points:

    • The order status is Completed (not just Processing or On hold).
    • If Only allow Gmail addresses is enabled, confirm that the billing email is Gmail. Otherwise, the plugin will log a note instead of granting access.
    • The folder/file is inside the Drive account that is actually connected to the plugin.
  7. The picker rejects a folder or shows a warning
    → For that product, Only use top-level folders is enabled and you are trying to select a nested folder or shared item. Select a top-level folder in “My Drive” or disable that restriction in the product settings.
Scroll to Top