Upcoming changes to the Google Drive API and Google Picker API
If you use the Google Drive or Picker APIs to power your apps, there are a few upcoming changes that you’ll need to plan for to ensure your application continues to work properly (and that you’re taking advantage of the latest features in Drive).
First, we’re making changes to authorization for the Google Drive API. If you authorize download requests to the Drive API using the access token in a query parameter, you will need to migrate your requests to authenticate using an HTTP header instead. Starting January 1, 2020, download calls to files.get, revisions.get and files.export endpoints which authenticate using the access token in the query parameter will no longer be supported, which means you’ll need to update your authentication method.
Here’s what we recommend you do if authentication with the HTTP header is not possible:
For file downloads, redirect to the webContentLink which will instruct the browser to download the content. If the application wants to display the file to the user, they can simply redirect to the alternateLink in v2 or webViewLink in v3.
For file exports, redirect to the export link in exportLinks with the desired mime type which will instruct the browser to download the content.
It’s important to note that Drive API calls to files.get or revisions.get that do not download media content (i.e. do not set the query parameter of ?alt=media) will not be affected.
Next, we’re introducing a new Drive API resource collection, called “Drives,” to replace the “Team Drives” resource collection. This new resource collection can help you create, delete, get, list and update your shared drives, and features all the same fields, resources and available methods as the “Team Drives” resource collection. If you have been using the “Team Drives” resource collection in your applications, consider migrating as soon as possible as all related fields for Drive API , Drive Activity API and Google Picker API, will no longer be supported starting June 1, 2020.
It’s also important to note that starting June 1, 2020, applications will no longer be able to opt-in to support Team Drives. This means that Team Drive items, including both Team Drives and files within a Team Drive, will be returned in all relevant requests, if applicable, so you’ll need to support this functionality by default. Read more on how to do that here.
Doing more with the Drive API
We’re constantly improving Drive to make it easier to organize and access information quickly so that you can use that information to make your applications more useful. For example, more recently, we added a new feature that allows you to hide drives (which is supported by the new “Drives” resource collection we talked about above). This means that when you list a user’s “Drives,” you can specify the query to filter results based on the hidden state of the Drive, which helps users quickly access the Team Drives, or files within Team Drives, that are most important to them.
There are so many ways to use the Drive API to improve your applications or speed up workflows. Learn more about the Drive API (and other APIs) on our website.