Download Recording

Retrieve the specified recording's audio file. ⚠️ Be sure to not expose your API Credentials to end-users

Request URL

GEThttps://voice.bandwidth.com/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media

Basic Authentication

Bandwidth's Voice API leverages Basic Authentication with your Dashboard API Credentials. Read more about how Bandwidth secures endpoints in the Security & Credentials document.


Supported Parameters

Parameter Description
None None

Example 1 of 1: Download a recording

curl -X GET \
    --url "https://voice.bandwidth.com/api/v2/accounts/{accountId}/calls/{callId}/recordings/{recordingId}/media" \
    -u '{username}:{password}' \
    --output recording.wav
HTTP/1.1 200
try {
    ApiResponse<InputStream> response = voiceClient.getStreamRecordingMedia(VOICE_ACCOUNT_ID, "callId", "recordingId");
    byte[] bytes = response.getResult().readAllBytes();
} catch (ApiException | IOException e) {
    e.printStackTrace();
}
var response = controller.GetStreamRecordingMedia(accountId, callId, recordingId);
Console.WriteLine(response.Data.Length);
File.open("file_to_write", "wb") do |f|
    response = voice_client.get_stream_recording_media(VOICE_ACCOUNT_ID, call_id, recording_id)
    f.puts(response.data)
end
with(open("file_to_write", "wb")) as f:
    response = voice_client.get_stream_recording_media(VOICE_ACCOUNT_ID, call_id, recording_id)
    f.write(response.body)
var response = await voiceController.getStreamRecordingMedia(accountId, callId, recordingId);
fs.writeFileSync("file_to_write", response, "binary");
try {
    $response = $voiceClient->getStreamRecordingMedia($accountId, $callId, $recordingId);
    $file = fopen("file_to_write", "wb") or die("Unable to open file");
    fwrite($file, $response->getResult());
    fclose($file);
} catch (BandwidthLib\APIException $e) {
    print_r($e);
}

results matching ""

    No results matching ""