To display your app in Google Drive when a user creates or opens a file, you need to configure a Drive UI Integration. This integration is also required to list your app in the G Suite Marketplace.
- Sign in to the Google API Console.
- At the top, select your app’s project.
- At the bottom of the “APIs & Services” dashboard, click Google Drive API.
- If you don’t see this option, enable the Google Drive API.
- On the left, click Drive UI Integration. Then, add details about your app.
Add details about your app
Your Application Name and Short Description are displayed to users in the "Manage apps" dialog in the Google Drive UI. You can also add a Long Description to describe your application in more detail.
Upload an Application icon to display in a user's list of connected Drive apps and in the "Open with" context menu for relevant file types. Add icons in PNG format with a transparent background, properly scaled for one or more sizes. It can take up to 24 hours before your application icon appears in Drive.
Add details about your app's Drive integration
Set up how your app integrates with Google Drive, including how to open a file from Google Drive in your app and what types of files your app can open.
Define where to open Drive files with your app
Your Open URL is used when a user opens a file from Google Drive with your app. Make
sure you enter a fully-qualified domain name;
localhost doesn't work. You’re required to
verify ownership of this URL
to list your app in the G Suite Marketplace.
You can include the following template variables in your Open URL to pass
information from Google Drive to your app. If no template variables are used in your Open URL, a
state query parameter
containing a JSON-encoded string of all template variables is appended.
For more details, read Open Files.
||A comma-separated list of file IDs that are being opened.|
||A comma-separated list of file IDs that are being exported.|
||The profile ID that uniquely identifies the user.|
||The action being performed. Either:
Define what Drive files your app can open
To define what files your app can open, add MIME types and file extensions. Only include standard, canonical types or Google MIME types and make sure they’re free of typos and misspellings. If your app only opens shortcut files, you can leave MIME type blank.
- Default: Files that your app is uniquely built to open. For example, a native format for layering and editing images.
- Secondary: Files that your app can open, but aren’t specific to your app. For example, png and jpg images for an image editing app.
If a user installs multiple Drive apps that can open a file, the most-recently installed app is used until the user chooses another app.
Control file creation and imports
To control whether users can create new Drive files with your app, enable Allow users to create new documents using this application. If enabled, you must provide a New URL that users are redirected to when a user selects your application from the New menu in Drive.
You can choose to import Drive files and convert them into formats supported by your app. For more information, read Open and convert Google Docs in your app.
After you've enabled the Drive API and configued your app's Drive UI Integration, install your app.