Get download location
GET
/media/{id}/download_location
const url = 'https://api.colourbox.com/media/1/download_location?on_behalf_of=Arne&project_id=753';const options = {method: 'GET', headers: {Authorization: 'CBX-SIMPLE-TOKEN Token=<token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”- simple_token
- None
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
integer
Query Parameters
Section titled “Query Parameters”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.
Responses
Section titled “Responses”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"}