- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
Downloads the content of a file. For more information, see Download and export files.
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. For a list of supported MIME types, see Export MIME types for Google Workspace documents. 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.