Skip to content

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 seeWhat it means
Not allowedYou’re not in that chat, or it’s view-once
Not foundWrong id
GoneMore than 7 days since it was sent
Invalid keyMissing or revoked API key

You can only download a file if you could open it in the Kenalko app.

Example handler

Next