Skip to main content

Api to download file using private url

The following documentation details of get signed url token or file stream

API Endpoint​

Endpoint URL: POST https://api.trential.dev/verification/api/1.0/download-manager/download-file

Try it out →

Request​

To get signed url, send a POST request with the following JSON payload:

{
"url": "private url of file",
"getDownloadToken": true
}

Response​

If getDownloadToken is true, the response will be as follows:

{
"code": 0,
"message": "Success",
"data": {
"downloadToken": "6647408598332f345e0747ae"
}
}

Response​

If getDownloadToken is false, the response will be stream of file:

The following documentation details of get signed url using downloadToken

API Endpoint​

Endpoint URL: GET https://api.trential.dev/verification/api/1.0/download-manager/url

Try it out →

Parameters​

To get a signed URL, send a GET request with the following query parameter: token=downloadToken

Response​

If token is valid, the response will be as follows:

{
"code": 0,
"message": "Success",
"data": {
"signedUrl": "signed url of file (expire in 180 min)"
}
}