const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/media/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"Downloads the media file content as a stream with appropriate Content-Disposition header for file download.
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/media/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"Media file identifier
Returns media file stream successfully
The response is of type file.
Was this page helpful?