Chat

Download a chat attachment

  • Sandbox: available
  • On your own host? Choose https://{host} in the playground.
GET
/v1/chat/threads/{threadId}/messages/{messageId}/attachments/{attachmentId}

Answers a link that downloads a file sent with a message. Whoever can read the message can download its files.

Behaviour

  • The link works for an hour and needs no bearer, so it fits a browser tab, a download or a PDF viewer. Ask again for a fresh one when it has run out.
  • An id the message does not carry answers 404 CHAT_ATTACHMENT_NOT_FOUND.

Example

curl 'https://api.sandbox.ovok.com/v1/chat/threads/<threadId>/messages/<messageId>/attachments/<attachmentId>' \  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3NjcyNjg4MDAsImV4cCI6MTc2NzI3MjQwMH0.Ql3B_ztDvctlyZ2z0vp4sl3ExXRQGkzmxdmTAqxNzZk'

Authorization

bearer
headerAuthorizationBearer <JWT>

Path Parameters

threadId*string

The thread id.

Match^[A-Za-z0-9\-.]{1,64}$
messageId*string

The message id.

Match^[A-Za-z0-9\-.]{1,64}$
attachmentId*string

An attachment id, from POST /v1/chat/attachments.

Match^[A-Za-z0-9\-.]{1,64}$

Response Body

A link that downloads the file for the next hour.

application/json
  1. response
url*string

Downloads the file; needs no bearer.

expiresAt*string

When the link stops working.

Example Request
curl -X GET 'https://api.sandbox.ovok.com/v1/chat/threads/string/messages/string/attachments/string'
Example Response
{  "url": "string",  "expiresAt": "string"}