List images and videos shared in a conversation
const url = 'https://chat.work.optidata.cloud/api/chats/36/attachments/media?page=1';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://chat.work.optidata.cloud/api/chats/36/attachments/media?page=1' \ --header 'Authorization: Bearer <token>'The visual attachments of the conversation, newest first, paginated — what a gallery view is built from.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Numeric id of the conversation.
Query Parameters
Section titled “Query Parameters”1-based page number.
Responses
Section titled “ Responses ”A page of attachments, newest first.
object
Navigation links of a paginated envelope.
object
A file attached to a message.
object
Alternative identifier accepted by the attachment content endpoints.
Size in bytes.
true for a voice message.
Playback length in seconds, for audio and video.
Thumbnail, when one was generated.
Storage metadata. Its keys depend on where the file is stored, so treat it as an open object.
Example
{ "current_page": 1}Missing, malformed or expired authentication key.
Authentication failures — and a few permission denials — use an error
key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The caller is not a participant of the conversation, or lacks the role the operation requires.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "This action is unauthorized."}The resource does not exist, or does not belong to the given conversation.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "No query results for model [App\\Models\\Chat\\Chat] 99999999"}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}