The Google Drive API allows you to create apps that leverage Google Drive cloud storage. You can develop applications that integrate with Drive, and create robust functionality in your application using the Drive API.
This diagram shows the relationship between your Drive app, Drive, and the Drive API:
These terms define the key components shown in Figure 1:
- Google Drive
- Google's cloud file storage service provides users with a personal storage space, called My Drive, and the option to access collaborative shared folders, called shared drives.
- Google Drive API
- The REST API that allows you to leverage Drive storage from within your app.
- Google Drive app
- An app that leverages Drive as its storage solution.
- Google Drive UI
- Google's user interface that manages files stored on Drive. If your app is an editor-type app, such as a spreadsheet or word processor, you can integrate with the Drive UI to create and open files within your app.
- My Drive
- A Drive storage location that a specific user owns. Files stored on My Drive can be shared with other users, but ownership of the content remains specific to an individual user.
- OAuth 2.0
- The authorization protocol that Drive API requires to authenticate your app users. If your application uses Sign In With Google, it handles the OAuth 2.0 flow and application access tokens.
- Shared drive
- A Drive storage location that owns files that multiple users collaborate on. Any user with access to a shared drive has access to all files it contains. Users can also be granted access to individual files inside the shared drive.
What can you do with the Drive API?
You can use the Drive API to:
- Download files from Drive and Upload files to Drive.
- Search for files and folders stored in Drive. Create complex search queries that return any of the file metadata fields in the Files resource.
- Let users share files, folders, and drives to collaborate on content.
- Combine with the Google Picker API to search all files in Drive, then return the file name, URL, last modified date, and user.
- Create third-party shortcuts that are external links to data stored outside of Drive, in a different datastore or cloud storage system.
- Create a dedicated Drive folder to store application-specific data so the app cannot access all the user's content stored in Drive.
- Integrate your Drive-enabled app with the Drive UI using the Google Drive UI. It's Google's standard web UI that you can use to create, organize, discover, and share Drive files.
- Apply labels to Drive files, set label field values, read label field values on files, and search for files using label metadata terms defined by the custom label taxonomy.
To learn about developing with Google Workspace APIs, including handling authentication and authorization, refer to Develop on Google Workspace.
To learn how to configure and run a simple Drive API app, read the Quickstarts overview.