# Download a chat attachment

Canonical page: https://docs.ovok.com/api/chat/download-a-chat-attachment

`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

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