Download a Recording File

Download a specific call recording file.

Note:
  • If stereo-separated recording feature is enabled (Set on Call Features > Recording in the PBX web portal), all recording files will be downloaded in the specified format.
  • If the recording file download format is set to .mp3, only one concurrent request is supported for downloading recording via this API.

Steps to download a call recording file

Request URL

GET {base_url}/{api_path}/recording/download?access_token={access_token}

Request parameters

Parameter Required Type Description
id No Integer The unique ID of the call recording.
Note:
  • You can query the recording's ID using Search Specific Recording.
  • Either id or file is required for querying a recording file.
file No String The name of the call recording file.
Note: Either id or file is required for querying a recording file.

Response parameters

Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
file String The name of the call recording file.
download_resource_url String The download URL of the call recording file.
Note: The download URL is only valid for 30 minutes.

Examples

Request Example

Get the download URL of a call recording file by ID.

GET /openapi/v1.0/recording/download?id=1727&access_token=WQMR0cuirhX264oZMa9pV03T9li924NS HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com

Response Example

HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "file": "20220412173331-1649756009.12-2002-2005-Internal.wav",
    "download_resource_url": "/api/download/Recording-X.7.0.6-1-download-20220412175901-M8zB66xYUNTNMr2D.wav"
}

Download the call recording file

After obtaining the download URL for the recording file, combine it with the {base_url} and append the {access_token} parameter. Then, use the complete link to download the desired file.

Download link format

{base_url}/{download_resource_url}?access_token={access_token}

Download link example

https://yeastardocs.example.yeastarcloud.com/api/download/Recording-X.7.0.6-1-download-20220412175901-M8zB66xYUNTNMr2D.wav?access_token=WQMR0cuirhX264oZMa9pV03T9li924NS