Download an MOH Audio File
Retrieve the download resource URL of a specified audio file in a MOH (music on hold) playlist, then access the URL to download the audio file.
Request URL
GET {base_url}/{api_path}/moh_files/download?list_name={list_name}&file={file}&access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| list_name | Yes | String | The name of the MOH playlist. Note: You can query the name
of the MOH playlist using Query MoH Playlists. |
| file | Yes | String | The name of the audio file, including the file extension
(e.g., "WhisperingPine.wav"). Note: You can query the name of the audio file using Query MOH Audio File List. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| file | String | The name of the audio file. |
| download_resource_url | String | The download resource URL of the audio file. |
Example
Request example
GET /openapi/v1.0/moh_files/download?list_name=demo_list&file=demo_track.wav&access_token=gwakjgu9ZBUfz36wql4ndsVKkryI0kdj HTTP/1.1
Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"file": "demo_track.wav",
"download_resource_url": "/api/download/P550-MohPrompt-37.24.0.117-download-20260914165139-XCLciWr6CHloEPOu.wav"
}
Combine the download resource URL with the {base_url}. Then use the complete link to download the audio file.
Download link format
{base_url}/{download_resource_url}
Download link example
https://192.168.5.150:8088//api/download/P550-MohPrompt-37.24.0.117-download-20260914165139-XCLciWr6CHloEPOu.wav