This section provides samples and learning resources for the Drive platform.
Check out the Drive API video library for links to introductory videos on using the API. The Drive API intro codelab is a structured guide that shows how to build a simple Python command-line application using the Drive API. Its content can also be used as a model for using other G Suite and Google APIs.
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 embeddable file picker and sharing widgets
- Opening files with the Drive interface
- Uploading and downloading files using CORS
- Creating a Chrome Web Store listing and associating an application with a MIME type
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.
The source for the example is available on GitHub.