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.staging.trential.app/verification/api/1.0/download-manager/download-file
Request
To get signed url, send a POST request with the following JSON payload:
{
"url": "private url of file",
"getDownloadToken": true // if it is false then api will return stream of file
}
Response
If getDownloadToken is true, the response will be as follows:
{
"code": 0,
"message": "Success",
"data": {
"downloadToken": "6647408598332f345e0747ae" //token to use in get signed url
}
}
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.staging.trential.app/verification/api/1.0/download-manager/url
Parameters
To get signed url, send a Get request with the following JSON payload: token=downloadToken //send downloadToken in the query Parameters
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)"
}
}