Google Drive

ownCloud uses OAuth 2.0 to connect to Google Drive. This requires configuration through Google to get an app ID and app secret, as ownCloud registers itself as an app.

All applications that access a Google API must be registered through the Google Cloud Console. Follow along carefully because the Google interface is a bit of a maze and it’s easy to get lost.

If you already have a Google account, such as Groups, Drive, or Mail, you can use your existing login to log into the Google Cloud Console. After logging in click the Create Project button.

Google Cloud Console

Create Project

Give your project a name, and either accept the default Project ID or create your own, then click the Create button. For this example a random name was chosen, "owncloud-04-27". However, feel free to choose your own name.

Choose a name

After your project is created, click on the notifications bell and select your project.

Notification bell

Go to Api overview to select google’s API.


Google API


Now you must create your credentials.

Create Credentials

First, select Web Browser and User data.

Access type and Data

The next screen that opens is Create OAuth 2.0 Client ID. Enter your app name.

Access type and Data

Authorized JavaScript Origins is your root domain, for example, without a trailing slash. Examples:

You need to configure Authorized Redirect URIs, and they must be in this form:

If you are configuring storage as an Administrator - choose the admin URI, if you are a user and configuring a storage - pick the personal URI.

If you are not sure what your exact URIs are - here is a quick guide to figure it out.

Authorized JavaScript Origins

This is just the address you access your ownCloud server at, where you see the login screen.

Login in ownCloud

Authorized Redirect URIs

If you have not already enabled the Google Drive storage, here is how you do it:

Login in ownCloud

Go to Storage in the Settings

Enable external Storage

Select Google Drive from dropdown menu

Now you have your Google Drive App enabled

The URL from this page is the one you have to enter in the <strong>Authorized Redirect URIs</strong>

Here is the correct result:

Client ID

Now we have to create a consent screen. This is the information in the screen Google shows you when you connect your new Google app to ownCloud the first time.

Choose a Project Name

Now you can download the credentials as a JSON file.

Download your Credentials

You can see either open this file with the editor of your choice (SublimeText for example), or you can put in in your web browser. This is when you do the later:


Enter the Client ID and Client Secret in the app and click Grant Access.

Now you have everything you need to mount your Google Drive in ownCloud.

Your consent page appears when ownCloud makes a successful connection.

Click Allow.

Grant Access

  1. Success

    You are finished when you see the green light confirming a successful connection.

    See the External Storage Configuration for additional mount options and information.

    All Green

Your Google Drive Folder

See the Configuring External Storage (GUI) for additional mount options and information.