Method gen_callrecording_url
This method allows you to create a temporary URL (meaning it will expire after a few seconds, so that we can allow access to third-parties without requiring authentication) to be passed to your web apps.
Parameters
| Parameter Name |
Description |
Allowed Values |
Default Value |
Optional |
| file_name |
file that you want to allow access to |
any valid callrecording file name |
none |
no |
Examples using curl
Example 1: File exists
1
2
3
4
|
curl -u 'DOMAIN_NAME:API_TOKEN' \
https://bcs.brastel.com/basix/api/gen_callrecording_url \
-H 'Content-Type: application/json' \
-d '{"file_name": "ede7b23e-c172-445e-832e-963b11ba2b96.mp3"}'
|
Response:
1
2
3
4
|
{
"result_code": 0,
"url": "https://brastel-bcs-prod-basix.s3.amazonaws.com/call-recordings/7y/brs.basix.ne.jp/callrecording/20180524-095951_11808_324e02d5-00f6-34d1-8646-b9c3f72c74b1.mp3?AWSAccessKeyId=ASDWEFSsfsefsesf&Expires=1545622368&Signature=YsfesetsdsgPhvm1B9g%3D"
}
|
Example 2: File doesn't exist (expired, deleted):
1
2
3
4
|
curl -u 'DOMAIN_NAME:API_TOKEN' \
https://bcs.brastel.com/basix/api/gen_callrecording_url \
-H 'Content-Type: application/json' \
-d '{"file_name": "ede7b23e-c172-445e-832e-963b11ba2b96.mp3"}'
|
Response:
1
2
3
4
5
6
|
{
"result_code": 500,
"error": {
"id": "file_not_found"
}
}
|