API-specific authorization and authentication information

This document contains API-specific authorization and authentication information. Before reading this document, be sure to read the general authentication and authorization information at Develop on Google Workspace.

Identify whether to use a restricted scope

When your app is installed, a user is asked to validate the scopes used by the app. Generally, you do not want users to have to decide to validate use of restricted scopes. So, when possible, use non-sensitive scopes as they narrow access to specific functionality needed by an app. In most cases, providing narrow access means using the https://www.googleapis.com/auth/drive.file per-file access scope.

There are only two types of Drive apps where use of restricted scopes might be permitted:

  • Use of restricted scopes might be permitted for native and web apps that provide local sync or automatic backup of users' Drive files.

  • Use of restricted scopes might be permitted for productivity and educational applications whose user interface might involve interaction with Google Drive. For example, if your app is a chat app that allows a user to paste Drive URL in a discussion, restricted scopes might be permitted. Productivity applications include task management, note taking, workgroup communications, and classroom collaboration applications.

Migrate an existing app to a non-sensitive scope

If you've developed a Drive app that uses any of the restricted scopes, we recommend migrating your app to use drive.file scope. This scope enables users to select the specific files from Google Drive, and through the Google Picker, that they want to allow your app to access. Apps that use the drive.file scope are not required to go through the restricted scope verification and third-party security assessment.

Many apps work with per-file access without any changes. If you are currently using your own file picker, we recommend switching to the Google Picker which fully supports the drive.file scope.

Save refresh tokens in long-term storage

You must save refresh tokens in secure long-term storage and continue to use them as long as they remain valid.