Download a file
Save a file someone sent you, using the id from the notification.
1 min read
When someone sends you a file, the notification includes an id — not the file itself. Fetch it with the same API key you use to send messages.
Save it within 7 days. After that the file is gone.
View-once photos and videos stay in the Kenalko app. You won’t get a notification, and you can’t download them here.
Example
export BASE=https://api.example.com
export KEY=knk_live_...
curl -sS -L "$BASE/v1/files/01ARZ3NDEKTSV4RRFFQ69G5FAV"
-H "Authorization: Bearer $KEY"
-o invoice.pdf Several files in one message: download each id in attachments.
If it doesn’t work
| What you see | What it means |
|---|---|
| Not allowed | You’re not in that chat, or it’s view-once |
| Not found | Wrong id |
| Gone | More than 7 days since it was sent |
| Invalid key | Missing or revoked API key |
You can only download a file if you could open it in the Kenalko app.