GetCallRecording#
The method is intended for downloading incoming and outgoing calls.
A link to the file in the .ogg format is returned in the response of the method. The idMessage of a call can be obtained using the LastIncomingCalls and LastOutgoingCalls methods.
The retention period of the files for downloading them is limited to 60 days.
Request#
POST
{{apiUrl}}/waInstance{{idInstance}}/getCallRecording/{{apiTokenInstance}}
To get the apiUrl, idInstance and apiTokenInstance request parameters, refer to the Before you start section.
Request parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
idMessage | string | Yes | Message (call) identifier |
Request body example#
{
"idMessage": "BAE550673B9C0497"
}
Response#
Response fields#
| Field | Type | Description |
|---|---|---|
status | string | Readiness of the message: processing - is being processed and there will be no download link, ready - ready |
downloadUrl | string | Link to the file from the message, available within one hour after it is generated, after an hour a new one has to be generated |
expireAt | integer | Lifetime of the link in UnixTime |
durationMs | integer | Conversation time in ms |
sizeBytes | integer | File size in bytes |
Response body example#
{
"downloadUrl": "https://sw-media.storage.yandexcloud.net/1103912412/a6679d42-2f7f-4121-acfe-1f993dfcf123.png"
}
DownloadFile errors#
For the list of errors common to all methods, see the Common errors section
| HTTP code | Error identifier | Description |
|---|---|---|
| 400 | Bad Request Validation failed | Empty or invalid idMessage |