AI-generated Key Takeaways
- 
          Downloads uploaded media, excluding Google Drive files, using the /v1/media/{+name}?alt=mediaURI.
- 
          To download, use a GET request specifying the media's resource name in the URL path. 
- 
          The response provides the file content as bytes, supporting partial downloads via the Rangeheader.
- 
          Authorization requires a Chat scope like chat.bot,chat.messages, orchat.messages.readonly.
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.