Method: spaces.messages.attachments.get
HTTP request
GET https://chat.googleapis.com/v1/{name=spaces/*/messages/*/attachments/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
name |
string
Required. Resource name of the attachment, in the form spaces/{space}/messages/{message}/attachments/{attachment} .
|
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Attachment
.
Authorization scopes
Requires the following OAuth scope:
https://www.googleapis.com/auth/chat.bot
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-11-22 UTC.
[null,null,["Last updated 2024-11-22 UTC."],[[["Retrieves metadata of a message attachment, with the actual attachment data fetched separately using the media API."],["Requires the `chat.bot` OAuth scope and app authentication for access."],["Uses a `GET` request to the specified URL with the attachment's resource name as a path parameter."],["Returns an `Attachment` object in the response body upon successful execution."],["Refer to the provided links for a practical example and further details on media download and authorization."]]],["This describes retrieving message attachment metadata via a `GET` request to `https://chat.googleapis.com/v1/{name=spaces/*/messages/*/attachments/*}`. The `name` parameter, specifying the attachment's resource location, is required. The request body must be empty. A successful response returns an `Attachment` instance. Accessing this data mandates the `https://www.googleapis.com/auth/chat.bot` OAuth scope. The actual attachment data can be downloaded using the linked media API.\n"]]