Downloads uploaded media, but not Google Drive files. Download is supported on the URI /v1/media/{+name}?alt=media
. To export bytes from a Google Drive file, see the files.export
method in Google Drive.
HTTP request
GET https://chat.googleapis.com/v1/media/{resourceName=**}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters | |
---|---|
resourceName |
Name of the media that you are downloading. For more information, see |
Request body
The request body must be empty.
Response body
If successful, this method returns the file content as bytes.
To download only part of a file, use the Range
header with a byte range. For example: Range: bytes=500-999
.
Authorization scopes
Requires one of the following OAuth scopes:
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.messages
https://www.googleapis.com/auth/chat.messages.readonly
For more information, see the Authorization guide.