Method: spaces.messages.attachments.get
HTTP-Anfrage
GET https://chat.googleapis.com/v1/{name=spaces/*/messages/*/attachments/*}
Die URL verwendet die Syntax der gRPC-Transcodierung.
Pfadparameter
Parameter |
name |
string
Erforderlich. Ressourcenname des Anhangs im Format spaces/{space}/messages/{message}/attachments/{attachment} .
|
Anfragetext
Der Anfragetext muss leer sein.
Antworttext
Wenn der Vorgang erfolgreich abgeschlossen wurde, enthält der Antworttext eine Instanz von Attachment
.
Autorisierungsbereiche
Erfordert den folgenden OAuth-Bereich:
https://www.googleapis.com/auth/chat.bot
Weitere Informationen finden Sie im Leitfaden zur Autorisierung.
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-05-16 (UTC).
[null,null,["Zuletzt aktualisiert: 2024-05-16 (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"]]