API reference · Files
Download through a signed link (no credentials: the token is the credential)
GET
/v1/downloadsNo authentication
- TypeScript
client.files.downloadWithLink()- Python
client.files.download_with_link()- CLI
hayonix api downloadWithLink
Answers 404 download_link_invalid for a token that is not genuine, 404 download_link_expired once it has expired, and 404 not_found when the object is gone.
None: this operation is public.
Examples
The samples read API_KEY and API_BASE_URL from the environment (see Setup). Values are examples.
curl -sS "$API_BASE_URL/downloads?token=%3Ctoken%3E" \
-H "Authorization: Bearer $API_KEY" \
-o output.binRequest
Query parameters
tokenstringrequiredFrom a download link
1–2048 characters
Response
200 the file content (application/octet-stream) — The bytes
Errors
Errors use the standard envelope. What this operation can answer:
| Status | Type | When |
|---|---|---|
400 | invalid_request_error | A parameter or body field is missing or not allowed; param names it. |
429 | rate_limit_error rate_limited | Too many requests; retry after retry-after seconds. |