This section provides samples for the Drive API.
Check out the Drive API video library for links to introductory videos on using the API.
The samples listed below and indexed in the left navigation menu are hosted on GitHub. You can fork these repositories and use the code as a reference for your own projects.
- Authorizing an application and authenticating user requests
- Using the Drive file picker.
files.getto get additional fields for a file.
To view or download the source, visit the Metadisplayer on the GitHub repo.
Each of the Google Drive platform-specific examples reflects a single
sample app: a text editor capable of
editing Google Drive files with the MIME type
The web version
implements two fundamental Google Drive use cases:
The flow for both use cases is similar. Google Drive redirects a user to the app after the user selects it from the Create menu or context menu of a file with a registered MIME type.
To view or download the source, visit the QuickEditor on the GitHub repo.