Method: spaces.messages.attachments.get
Richiesta HTTP
GET https://chat.googleapis.com/v1/{name=spaces/*/messages/*/attachments/*}
L'URL utilizza la sintassi di transcodifica gRPC.
Parametri del percorso
Parametri |
name |
string
Obbligatoria. Nome della risorsa dell'allegato, nel formato spaces/{space}/messages/{message}/attachments/{attachment} .
|
Corpo della richiesta
Il corpo della richiesta deve essere vuoto.
Corpo della risposta
In caso di esito positivo, il corpo della risposta contiene un'istanza di Attachment
.
Ambiti di autorizzazione
Richiede il seguente ambito OAuth:
https://www.googleapis.com/auth/chat.bot
Per ulteriori informazioni, consulta la guida all'autorizzazione.
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-05-16 UTC.
[null,null,["Ultimo aggiornamento 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"]]