PHPackages                             winter/wn-drivergoogledrive-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. winter/wn-drivergoogledrive-plugin

ActiveWinter-plugin[File &amp; Storage](/categories/file-storage)

winter/wn-drivergoogledrive-plugin
==================================

Driver that adds support for Google Drive as a filesystem to Winter CMS.

1391PHP

Since Aug 12Pushed 2y ago2 watchersCompare

[ Source](https://github.com/wintercms/wn-drivergoogledrive-plugin)[ Packagist](https://packagist.org/packages/winter/wn-drivergoogledrive-plugin)[ RSS](/packages/winter-wn-drivergoogledrive-plugin/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Google Drive Filesystem Driver for Winter CMS
=============================================

[](#google-drive-filesystem-driver-for-winter-cms)

Provides the [Google Drive](https://www.google.com/drive/) filesystem driver for [Winter CMS](https://wintercms.com/) using [masbug/flysystem-google-drive-ext](https://github.com/masbug/flysystem-google-drive-ext).

Installation
------------

[](#installation)

This plugin is available for installation via [Composer](http://getcomposer.org/).

```
composer require winter/wn-drivergoogledrive-plugin
```

Usage
-----

[](#usage)

For usage examples of interacting with this driver see the usage examples here: [ivanvermeyen/laravel-google-drive-demo#available-routes](https://github.com/ivanvermeyen/laravel-google-drive-demo#available-routes)

Configuration
-------------

[](#configuration)

Example Storage disk configuration using the `googledrive` storage driver provided by this plugin:

```
'mygoogledrive' => [
    'driver' => 'googledrive',
    'clientId' => '',
    'clientSecret' => '',
    'refreshToken' => '',
    'folder' => '',
],

```

See the following Configuration Guides for how to get the values for `clientId`, `clientSecret`, `refreshToken`, &amp; `folder`.

Configuration Guides
--------------------

[](#configuration-guides)

### Getting your Client ID and Secret

[](#getting-your-client-id-and-secret)

Log in to your Google Account and go to this website:

#### Create a Project

[](#create-a-project)

Create a new project using the dropdown at the top.

[![Create a new project](https://cloud.githubusercontent.com/assets/3598622/22397261/060eac9e-e56e-11e6-907c-717932605569.png)](https://cloud.githubusercontent.com/assets/3598622/22397261/060eac9e-e56e-11e6-907c-717932605569.png)

After you enter a name, it takes a few seconds before the project is successfully created on the server.

#### Enable Drive API

[](#enable-drive-api)

Make sure you have the project selected at the top.

Then go to Library and click on "Drive API" under "G Suite APIs".

[![Add Drive API](https://user-images.githubusercontent.com/3598622/28462245-a13b3d9c-6e1a-11e7-8cf8-0082ac8a9141.png)](https://user-images.githubusercontent.com/3598622/28462245-a13b3d9c-6e1a-11e7-8cf8-0082ac8a9141.png)

And then Enable it.

[![Enable Google Drive API](https://cloud.githubusercontent.com/assets/3598622/22397290/a858c6d8-e56e-11e6-9154-0052d7ecd0eb.png)](https://cloud.githubusercontent.com/assets/3598622/22397290/a858c6d8-e56e-11e6-9154-0052d7ecd0eb.png)

#### Create Credentials

[](#create-credentials)

Go to "Credentials" and click on the tab "OAuth Consent Screen". Fill in a "Product name shown to users" and Save it. Don't worry about the other fields.

[![Consent Screen](https://cloud.githubusercontent.com/assets/3598622/22397326/549fb3c0-e56f-11e6-9b0a-8771b0ba72b4.png)](https://cloud.githubusercontent.com/assets/3598622/22397326/549fb3c0-e56f-11e6-9b0a-8771b0ba72b4.png)

Then go back to Credentials, click the button that says "Create Credentials" and select "OAuth Client ID".

[![Create Credentials](https://cloud.githubusercontent.com/assets/3598622/22397368/33f8bd0a-e570-11e6-859c-34d112c772e4.png)](https://cloud.githubusercontent.com/assets/3598622/22397368/33f8bd0a-e570-11e6-859c-34d112c772e4.png)

Choose "Web Application" and give it a name.

Add  in "Authorized redirect URIs". You will need to use this in the next step to get your refresh token. Once you have the token, you can remove the URI.

[![Credentials](https://user-images.githubusercontent.com/3598622/28473452-e675826c-6e44-11e7-8ff0-bea423b0cff7.png)](https://user-images.githubusercontent.com/3598622/28473452-e675826c-6e44-11e7-8ff0-bea423b0cff7.png)

Click Create and take note of your **Client ID** and **Client Secret**.

### Getting your Refresh Token

[](#getting-your-refresh-token)

Go to .

> Make sure you added this URL to your Authorized redirect URIs in the [previous step](1-getting-your-dlient-id-and-secret.md).

In the top right corner, click the settings icon, check "Use your own OAuth credentials" and paste your Client ID and Client Secret.

[![Use your own OAuth credentials](https://cloud.githubusercontent.com/assets/3598622/22397216/24fe7d88-e56d-11e6-82cf-2d75365d8800.png)](https://cloud.githubusercontent.com/assets/3598622/22397216/24fe7d88-e56d-11e6-82cf-2d75365d8800.png)

In step 1 on the left, scroll to "Drive API v3", expand it and check the first drive scope.

[![Check Scopes](https://user-images.githubusercontent.com/3598622/28462312-fa4397ea-6e1a-11e7-93ad-365b891052a6.png)](https://user-images.githubusercontent.com/3598622/28462312-fa4397ea-6e1a-11e7-93ad-365b891052a6.png)

Click "Authorize APIs" and allow access to your account when prompted. There will be a few warning prompts, just proceed.

When you get to step 2, check "Auto-refresh the token before it expires" and click "Exchange authorization code for tokens".

[![Exchange authorization code for tokens](https://cloud.githubusercontent.com/assets/3598622/22397183/8472095c-e56c-11e6-85be-83adf00837c7.png)](https://cloud.githubusercontent.com/assets/3598622/22397183/8472095c-e56c-11e6-85be-83adf00837c7.png)

When you get to step 3, click on step 2 again and you should see your **refresh token**.

[![Refresh Token](https://cloud.githubusercontent.com/assets/3598622/22397176/2cef7a98-e56c-11e6-83b9-b4653850dbca.png)](https://cloud.githubusercontent.com/assets/3598622/22397176/2cef7a98-e56c-11e6-83b9-b4653850dbca.png)

### Getting your Root Folder

[](#getting-your-root-folder)

If you want to store files in your Google Drive root directory, then the folder ID can be `null`. Otherwise, go into your Drive and create a folder and then provide the path to that folder for this value.

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity22

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7253840?v=4)[Luke Towers](/maintainers/LukeTowers)[@LukeTowers](https://github.com/LukeTowers)

---

Top Contributors

[![LukeTowers](https://avatars.githubusercontent.com/u/7253840?v=4)](https://github.com/LukeTowers "LukeTowers (1 commits)")

### Embed Badge

![Health badge](/badges/winter-wn-drivergoogledrive-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/winter-wn-drivergoogledrive-plugin/health.svg)](https://phpackages.com/packages/winter-wn-drivergoogledrive-plugin)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
