Download a file through a signed download link
/file-download/{id}
The credential-less half of `elaichi__file__read`, for an AI app that cannot sign in: when a file is too large, or not a kind, to return inline, `file.read` answers a `download_url` pointing here. There is no session or API token: the query (`org`, `user`, optional `imp`, `exp`, `sig`) is the credential, an HMAC bound to this one file, organization and person, valid for 10 minutes and reusable until then. Every request re-checks access as that person, exactly as `GET /file/{id}/content` does (owner, share, or reach through a connection or toolbox; restrictions; current membership; the org gate), so a revoked share or a removed member stops the link before it expires. Every refusal (bad or expired signature, tampered query, a file the person no longer reaches) is the same `404`. Each download is audited as `file.downloaded` with `auth_type: download_link`.
Path Parameters
File id (file_…).
Query Parameters
The organization the link was minted in.
The person the link opens the file as.
The staff member impersonating user, when the link was minted in a support session.
Expiry, Unix seconds.
The signature (64 hex characters).
curl -X GET 'https://api.elaichi.ai/file-download/<id>' \
-H 'Content-Type: application/json'const response = await fetch('https://api.elaichi.ai/file-download/<id>', {
method: 'GET',
headers: {
'Content-Type': 'application/json',
},
});
const data = await response.json();
console.log(data);import os
import requests
url = "https://api.elaichi.ai/file-download/<id>"
headers = {
"Content-Type": "application/json",
}
response = requests.get(url, headers=headers)
print(response.json())