Download an attachment
GET/v1/attachments/{attachment_id}
- Scope
messages:read
Answers 302 to a short-lived download link for a photo or file on a message. Ask again for a new link; don't store it. The first download of a file can take a few seconds.
Parameters
Path
attachment_idstringrequiredThe attachment (
att_…), from a message'sattachments.
Response
302 FoundLocation is the download link.
Follow Location to the file; the link expires after a few minutes.
Errors
| Status | Code | Means |
|---|---|---|
| 404 | attachment_missing | The file is no longer there. |
| 413 | attachment_too_large | The file is larger than attachments may be. |
| 503 | line_unavailable | The line is having trouble right now. |
| 503 | upload_mismatch | A file didn't arrive whole. |
| 400 | validation_failed | A field is missing or invalid. |
| 401 | unauthorized | The API key is missing, unknown or revoked. |
| 403 | insufficient_scope | The API key lacks the scope this needs. |
| 404 | not_found | No such object, or the key can't see it. |
Every error is { "error": { "code", "message" } }. All error codes.