Skip to content

Get download location

GET
/media/{id}/download_location
curl --request GET \
--url 'https://api.colourbox.com/media/1/download_location?on_behalf_of=Arne&project_id=753' \
--header 'Authorization: CBX-SIMPLE-TOKEN Token=<token>'

Get the download location for a given media.

Authenticate with the Authorization header, or pass share_hash. The Authorization URL parameter is not accepted here; use /media/:id/download for embeddable URLs.

id
required
integer
download_info
string

A blob of JSON which describes the download

Example

{
"on_behalf_of": "Arne",
"project_id": 753
}
share_hash
string

The share hash of a share link containing the media. Not needed if you have download access to the media.

user
string

Set the user ID the download should be attributed to. This is a requirement if downloading Colourbox downloads and API key authentication is used.

Json description of method for fetching download

Media typeapplication/json
object
method

Will always be GET for this endpoint

string
url

URL media can be downloaded from. Valid for at least 5 minutes (15 when it points straight to storage); use it right away.

string

Example

{
"method": "GET"
}