Google Drive SDK

Enable the Drive Platform

To get started integrating with the Drive UI, you need to enable both the Drive API and the Drive SDK in your API project. This gives you access to the API as well as access to UI integration features.

Enable the Drive API

To interact with the Drive API, you need to enable the Drive API service for your app. You can do this in the Google API project for the app.

To enable the Drive API and Drive SDK, complete these steps:

  1. Go to the Google Developers Console.
  2. Select a project.
  3. In the sidebar on the left, select APIs & auth.
  4. In the displayed list of available APIs, find the Drive API and Drive SDK and set their statuses to ON.

Configure the Drive SDK

Enabling the Drive SDK requires you to provide detailed developer information for your app. To begin configuring the SDK, click the gear icon to the right of the Drive SDK and fill out the following sections.

Application info

This section contains fields to enter information describing your application. The Application Name and Short Description fields are displayed to users in Manage apps dialog in the Drive UI. The Full Description field can be used to describe your application in more detail. The description fields are also returned as part of the Apps resource.


Specify application and document icons to display in Google Drive. For more information on the requirements for these assets, see the Branding Guidelines.

Drive integration

In this section, you'll need to specify the Open URL for your app, and your preferences on how users create and open files with the app. Also, you can select from optional features like support for multiple file selection and Google doc import.

OAuth Client ID

If you want to use an OAuth 2.0 web server flow initiated by the Drive UI (as opposed to handled entirely by your app), enter a valid client ID here. The scopes you enter below in the Google API scopes form will be requested when users open a file from the Drive UI using your app. Make sure you use a valid Client ID for web applications or other valid Client ID for service accounts or installed apps.

To find your project's client ID and client secret, do the following:

  1. Go to the Google Developers Console.
  2. Select a project.
  3. In the sidebar on the left, select APIs & auth. In the list of APIs, make sure the status is ON for the Drive API.
  4. In the sidebar on the left, select Credentials.
  5. Find the correct set of OAuth 2.0 credentials in the list, and then find the Client ID and Client secret for those credentials. Note that your project might list different credentials for web applications, service accounts, Compute Engine and App Engine, and several types of installed applications (Android, Chrome, iOS, other). Some types of credentials may have a client ID without a client secret, and you can create additional credentials by selecting Create New Client ID.

Open URL

There are two important things to keep in mind for the Open URL:

  • Make sure you give a fully qualified domain name for Open URL -- localhost won't work.
  • The URL must belong to you. After the app registration is complete, you'll need to verify your ownership of this URL in order to create a Chrome Web Store listing. For more information, see Site Verification.

Setting MIME types and extensions

Specify the MIME types and extensions your app can open. When entering these values, consider the following:

  • Specify both MIME types and extensions. There are cases where just one or the other is not sufficient.
  • Make sure the MIME types you enter are standard, canonical types or Google MIME types, free of typos or misspellings.
  • Consider carefully whether your app needs default or secondary status.

Default vs. Secondary status is related to opening files with your app by default. Simply put, default types are the MIME types and extensions you really want your app to open by default (the user makes the final choice on this). Secondary types are ones that your app can open. For example, an image editor might need to list numerous secondary types to open (png, jpg, and so on) but few default types, which might include only its native format for layering and editing images.

When multiple installed apps are registered as the default type for a particular MIME type or extension, the last-installed app acts as default until the user makes a specific selection.


You can opt to import Google Docs and convert them into formats supported by your app. For more information, see Open and convert Google Docs in your app.

Google API scopes

If you entered an OAuth client ID and opted into Drive-initiated authorization, you can enter scopes in this section. The per-file authorization scope for Drive files,, is added by default for all drive apps. In order to authenticate Drive users with the User Info service as described in About Authorization, you must manually enter the following two scopes:

If your app requires access to any other Google APIs, you can add those scopes as well. For more information about adding scopes, see Choosing Auth Scopes.

Next steps

After you have enabled the Drive SDK, you'll need users -- or a test account for development -- to install your app.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.