Download a delivered file
Downloads the file named by a valid download link, with single byte ranges so downloads resume.
{DELIVERY_WORKER_URL}/media/{grantId}# DOWNLOAD_URL is a download link from Create deliveries. No API key: the URL is the authorization.curl --fail -sS --max-redirs 0 \ -o movekit-video.mp4 \ "$DOWNLOAD_URL"No API key. The URL from the API response is the authorization; never send the key to it.
Each link allows 16 requests.
Path parameters
grantIdstringrequiredThe download link id in the delivery URL.
- Range
- pattern ^grant_
- Example
grant_69e604c7-2f38-485c-89b3-24d61ab2af0e
Query parameters
tstringrequiredThe signed token from the delivery URL. Treat the whole URL as opaque.
- Example
eyJnIjoiZ3JhbnRfNjllNjA0YzcifQ.Lqvtn5kUEJG22znYCC-jXAWyPJMsAP1Po2eNG279Yp
Headers
RangestringOne range: bytes=a-b, bytes=a- or bytes=-n. Multiple ranges are refused with 416.
- Example
bytes=0-1048575
If-RangestringETag or HTTP date. A mismatch returns the full object instead of a range.
- Example
"d74cedbbfbc4d6d93afd73cbbf4ca7e6d4ef1d876d12be14913c617974ba8109"
Response 200
The full file named by the download link. Cache-Control: private, no-store; Content-Disposition: attachment. Binary body; the headers carry the examples.
HTTP/1.1 200Accept-Ranges: bytesETag: "d74cedbbfbc4d6d93afd73cbbf4ca7e6d4ef1d876d12be14913c617974ba8109"- Accept-Ranges
- Always
bytes. - ETag
- Strong validator for If-Range: the quoted sha256 of the file.
Errors
delivery_invalidThe token failed verification, or the request was malformed.
invalid_api_keyThe key that issued the download link was revoked.
asset_not_availablenot_foundUnknown route, or the asset is not available.
method_not_allowedOnly GET, HEAD and OPTIONS.
asset_mismatchThe stored object does not match the download link; request a fresh download link.
delivery_expiredDownload links work for 300 seconds. Request a fresh download link afterwards.
range_not_satisfiableContent-Range carries bytes */size.
sync_limit_exceededdelivery_limit_exceededdaily_request_limitsample_busyA download link allows 16 requests. Each file version can be downloaded 20 times a month, then gets sync_limit_exceeded until the count starts again at 00:00 UTC on the 1st of each month; new versions start again. An account that reached its media requests for the day gets daily_request_limit until 00:00 UTC; a keyless sample link gets sample_busy when the sample is used up for the day.
delivery_disableddelivery_paused_globaldelivery_unavailableMedia delivery is disabled, paused or not configured. Retryable; nothing is charged.
Every code with its next step is on Errors.