Get Call Sid Recordings
curl --request GET \
--url https://api.example.com/api/v1/calls/sid/{call_sid}/recordings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/calls/sid/{call_sid}/recordings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calls/sid/{call_sid}/recordings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calls/sid/{call_sid}/recordings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"call_id": 123,
"recording_sid": "<string>",
"file_path": "<string>",
"recording_url": "<string>",
"duration": 123,
"format": "wav",
"recording_type": "full",
"recording_source": "twilio",
"status": "recording",
"created_at": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Call Data
Get Recordings by Call SID
Get all recordings for a call by Twilio Call SID.
Returns recordings if the call belongs to an assistant in your organization.
GET
/
api
/
v1
/
calls
/
sid
/
{call_sid}
/
recordings
Get Call Sid Recordings
curl --request GET \
--url https://api.example.com/api/v1/calls/sid/{call_sid}/recordings \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.example.com/api/v1/calls/sid/{call_sid}/recordings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/calls/sid/{call_sid}/recordings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/calls/sid/{call_sid}/recordings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/calls/sid/{call_sid}/recordings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body[
{
"id": 123,
"call_id": 123,
"recording_sid": "<string>",
"file_path": "<string>",
"recording_url": "<string>",
"duration": 123,
"format": "wav",
"recording_type": "full",
"recording_source": "twilio",
"status": "recording",
"created_at": "2023-11-07T05:31:56Z"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}This endpoint retrieves a list of all recordings associated with a specific call, identified by its Twilio Call SID.
Path Parameters
call_sid(string, required): The unique Call SID from Twilio.
Response
The response is a JSON array of recording objects. Each object contains details about a recording, including a URL to the audio file.Response
[
{
"id": 1,
"call_id": 101,
"recording_sid": "RExxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://api.twilio.com/2010-04-01/Accounts/AC.../Recordings/RE...",
"duration": 300,
"created_at": "2023-10-30T10:05:01Z"
}
]
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Filter by recording type
Response
Successful Response