To open a saved file, you must first open the app used to create the file.

To display your app in Google Drive when a user creates or opens a file, you must first configure a Drive UI integration. Configuration is also required to list your app in the Google Workspace Marketplace.

  1. Sign in to the Google API Console.
  2. At the top of the page, next to the Google APIs logo, select your app’s project. The APIs & Services dashboard appears.
  3. At the bottom of the APIs & Services dashboard, click Google Drive API. If you don’t see this option, you must enable the Google Drive API.
  4. Click the Drive UI Integration tab. The configuration page appears.
  5. Enter an application name in the Application Name field. The application name is displayed to users in the Manage Apps tab in Drive settings.
  6. Enter a short description in the Short Description field. The short description is displayed to users in the Manage Apps tab in Drive settings.
  7. (optional) Enter a long description in the Long Description field.
  8. Upload one or more icons to display in a user's list of connected Drive apps and in the "Open with" context menu item. Icons should be in PNG format with a transparent background. Icons can take up to 24 hours to appear in Drive.

    Note: Document icons are deprecated. Your application icon appears next to shortcut and third-party shortcut files. A set of standard icons is used for other file types.
  9. If you want users to use the Drive UI's "Open with" context menu item, enter a URL to your app in the Open URL field. This URL is used by the "Open With" context menu item.

    • This URL must contain a fully qualified domain name; localhost doesn't work.
    • You must verify ownership of this URL before you can list your app in the Google Workspace Marketplace.
    • By default, a state query parameter is appended to this URL to pass data from the Drive UI to your app. For information on the contents of the state parameter, refer to .
    Warning: Automatically showing the OAuth 2.0 consent screen is deprecated. Don't select this option. The application must start all authorization requests.
  10. Enter default mime types and file extensions in the Default Mime Types and Default File Extensions fields. Default mime types and file extensions represent files your app is uniquely built to open. For example, your app might open a built-in format for layering and editing images. Only include standard media types and make sure they’re free of typos and misspellings. If your app only opens shortcut or third-party shortcut files, you can leave MIME type blank.

  11. Enter secondary mime types and file extensions in the Secondary Mime Types and Secondary File Extensions fields. Secondary mime types and file extensions represent files your app can open, but aren’t specific to your app. For example, your app might be an image-editing app that opens png and jpg images. Only include standard media types and make sure they’re free of typos and misspellings. If your app only opens shortcut or third-party shortcut files, you can leave MIME type blank.

    Note: 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.
  12. If you want users to click the Drive UI's New button and create a file with your app, check Creating files. The New URL and optional Document Name fields appear.

    • This URL must contain a fully qualified domain name; localhost doesn't work.
    • You must verify ownership of this URL before you can list your app in the Google Workspace Marketplace.
    • By default, a state query parameter is appended to this URL to pass data from the Drive UI to your app. For information on the contents of the state parameter, refer to .
  13. Enter a URL in the New URL field. This URL is used by the "New" button to redirect the user to your application.

    Note: Leave the Document Name field blank. This field is no longer used.
  14. (Optional) If you want your app to be able to open Google Workspace-supported files, check Importing.

  15. (Optional) If your app needs to manipulate files on shared drives, check Shared drives support. For further information on how to support shared drives in your app, refer to Implement shared drive support

  16. Click Submit.

Request the drive.install scope

Request the

{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
0 scope to integrate with the Drive UI. When requesting this scope, users receive a dialog similar to this:

To open a saved file, you must first open the app used to create the file.

For more information about scopes you can request for Drive apps, and how to request them, see API-specific authorization and authentication information

Note: If your Drive app is published to the Google Workspace Marketplace, users and domain administrators can search for and install the app directly from the Google Workspace Marketplace.

The state parameter

By default, a state parameter is appended to the Open and New URL to pass data from the Drive UI to your app. This parameter contains a JSON-encoded string containing template variables with data about the request to your app. The variables included depend on the type of URL used (Open URL or New URL):

Template variableDescriptionApplicable to which URL type?
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
3A comma-separated list of file IDs being opened.Open URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
4A comma-separated list of file IDs being exported (used only when opening built-in Google documents).Open URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
5A JSON dictionary of file IDs mapped to their respective resource keys.Open URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
6The id of the parent folder.New URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
7The resource key of the parent folder.New URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
8The profile ID that uniquely identifies the user.Open URL and New URL
{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}
9The action being performed. The value is localhost0 when using an Open URL or localhost1 when using a New URL.Open URL and New URL

The state parameter is URL-encoded, so your app must handle the escape characters and parse it as JSON. Apps can detect the localhost1 value in the state parameter to verify this is a request to create a file.

Example state information in JSON for a New URL

The state information for a New URL is:

{
  "action":"create",
  "folderId":"0ADK06pfg",
  "folderResourceKey":"kahDue92has-1",
  "userId":"103354693083460731603"
}

Example state information in JSON for an Open URL

The state information for an Open URL is:

{
  "ids": ["0Bz0bd"],
  "resourceKeys":{"0Bz0bd":"AAshj23Ad1"},
  "action":"open",
  "userId":"103354693083460731603"
}

The IDs and resource keys are used to fetch file metadata and download file content. Once your app has the file ID and an access token, it can check permissions, fetch the file metadata, and download the file content as described in the reference documentation for files.get.

Note: All apps, including apps opening files from shortcuts and third-party shortcuts, should call files.get to check the user's permissions for a document. Apps should warn read-only users when they are opening a file they cannot edit or save (instead of letting them spend time editing, and then giving an error on save).

Next steps

An installed app needs to be able to manage create and open actions launched from the Drive UI. To learn more, see Handle a New URL or Handle an Open URL.

Which application can be used to view the file system for a Windows device?

File Explorer, previously known as Windows Explorer, is a file manager application that is included with releases of the Microsoft Windows operating system from Windows 95 onwards.

What would happen if you tried to open a file created in one app in a different app quizlet?

What would happen if you tried to open a file created in one app in a different app? It will not open. Before you can open and edit a compressed file, you need to zip it. The Clipboard saves the file or folder from the source file or folder until you delete it from the Clipboard.

What type of window are you opening when you click Start button on the Windows desktop and then click the name of an app?

The window which is opened upon launching an application is the PROGRAM window.

Which is the following is an example of a computer system resource?

(1) In a computer system, system resources are the components that provide its inherent capabilities and contribute to its overall performance. System memory, cache memory, hard disk space, IRQs and DMA channels are examples.