Method: media.download

Stay organized with collections Save and categorize content based on your preferences.

Downloads media. Download is supported on the URI /v1/media/{+name}?alt=media.

Requires authentication. Fully supports service account authentication.

HTTP request

GET https://chat.googleapis.com/v1/media/{resourceName=**}

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
resourceName

string

Name of the media that is being downloaded. See spaces.messages.attachments.attachmentDataRef.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

Media resource.

JSON representation
{
  "resourceName": string
}
Fields
resourceName

string

Name of the media resource.

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.