spaces

GET /v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}

Gets the metadata of a message attachment. The attachment data is fetched using the media API. For an example, see Get metadata about a message attachment. Requires app authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot

Request

  • Base URL
    https://chat.googleapis.com
  • URL
    https://chat.googleapis.com/v1/spaces/{spacesId}/messages/{messagesId}/attachments/{attachmentsId}
  • Auth
    OAuth 2 and OAuth 2
    Implicit: https://accounts.google.com/o/oauth2/auth
    Scopes: https://www.googleapis.com/auth/chat.bot
    Authorization code: https://accounts.google.com/o/oauth2/auth
    Token URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/chat.bot

Path parameters

spacesIdstring required
messagesIdstring required
attachmentsIdstring required

Response

Successful response

contentNamestring

Output only. The original file name for the content, not the full path.

contentTypestring

Output only. The content type (MIME type) of the file.

downloadUristring

Output only. The download URL which should be used to allow a human user to download the attachment. Chat apps shouldn't use this URL to download attachment content.

namestring

Identifier. Resource name of the attachment. Format: spaces/{space}/messages/{message}/attachments/{attachment}.

source'SOURCE_UNSPECIFIED' | 'DRIVE_FILE' | 'UPLOADED_CONTENT'

Output only. The source of the attachment.

thumbnailUristring

Output only. The thumbnail URL which should be used to preview the attachment to a human user. Chat apps shouldn't use this URL to download attachment content.

Changes

No recorded changes to this operation across all 9 revisions of this API.