- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Downloads content of a file. Operations are valid for 24 hours from the time of creation.
HTTP request
POST https://www.googleapis.com/drive/v3/files/{fileId}/download
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
fileId |
Required. The ID of the file to download. |
Query parameters
Parameters | |
---|---|
mimeType |
Optional. The MIME type the file should be downloaded as. This field can only be set when downloading Google Workspace documents. See files.export MIME types for Google Workspace documents for the list of supported MIME types. If not set, a Google Workspace document is downloaded with a default MIME type. The default MIME type might change in the future. |
revisionId |
Optional. The revision ID of the file to download. This field can only be set when downloading blob files, Google Docs, and Google Sheets. Returns |
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Operation
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
Some scopes are restricted and require a security assessment for your app to use them. For more information, see the Authorization guide.