Skip to content
Hayonix

API reference · Files

Download through a signed link (no credentials: the token is the credential)

GET/v1/downloads
No 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.bin

Request

Query parameters

  • tokenstringrequired

    From 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:

Errors
StatusTypeWhen
400invalid_request_errorA parameter or body field is missing or not allowed; param names it.
429rate_limit_error rate_limitedToo many requests; retry after retry-after seconds.