Skip to content
Skip to content

Download a delivered file

Downloads the file named by a valid download link, with single byte ranges so downloads resume.

Owned or sample content
GET{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

grantIdstringrequired

The download link id in the delivery URL.

Range
pattern ^grant_
Example
grant_69e604c7-2f38-485c-89b3-24d61ab2af0e

Query parameters

tstringrequired

The signed token from the delivery URL. Treat the whole URL as opaque.

Example
eyJnIjoiZ3JhbnRfNjllNjA0YzcifQ.Lqvtn5kUEJG22znYCC-jXAWyPJMsAP1Po2eNG279Yp

Headers

Rangestring

One range: bytes=a-b, bytes=a- or bytes=-n. Multiple ranges are refused with 416.

Example
bytes=0-1048575
If-Rangestring

ETag 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 200
Accept-Ranges: bytes
ETag: "d74cedbbfbc4d6d93afd73cbbf4ca7e6d4ef1d876d12be14913c617974ba8109"
Accept-Ranges
Always bytes.
ETag
Strong validator for If-Range: the quoted sha256 of the file.

Errors

400
delivery_invalid

The token failed verification, or the request was malformed.

401
invalid_api_key

The key that issued the download link was revoked.

404
asset_not_availablenot_found

Unknown route, or the asset is not available.

405
method_not_allowed

Only GET, HEAD and OPTIONS.

409
asset_mismatch

The stored object does not match the download link; request a fresh download link.

410
delivery_expired

Download links work for 300 seconds. Request a fresh download link afterwards.

416
range_not_satisfiable

Content-Range carries bytes */size.

429
sync_limit_exceededdelivery_limit_exceededdaily_request_limitsample_busy

A 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.

503
delivery_disableddelivery_paused_globaldelivery_unavailable

Media delivery is disabled, paused or not configured. Retryable; nothing is charged.

Every code with its next step is on Errors.