Method: spaces.messages.attachments.get
Solicitud HTTP
GET https://chat.googleapis.com/v1/{name=spaces/*/messages/*/attachments/*}
La URL usa la sintaxis de la transcodificación gRPC.
Parámetros de ruta de acceso
Parámetros |
name |
string
Obligatorio. Nombre del recurso del adjunto, con el formato spaces/{space}/messages/{message}/attachments/{attachment} .
|
Cuerpo de la solicitud
El cuerpo de la solicitud debe estar vacío.
Cuerpo de la respuesta
Si se ejecuta de forma correcta, el cuerpo de la respuesta contiene una instancia de Attachment
.
Alcances de autorización
Requiere el siguiente alcance de OAuth:
https://www.googleapis.com/auth/chat.bot
Para obtener más información, consulta la guía de autorización.
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2024-05-16 (UTC)
[null,null,["Última actualización: 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"]]