Rest API: Recordings

Twilio Video Recordings API

Twilio Video’s Group Rooms and Recording APIs enable you to record the audio and video share in a Programmable Video Room. To turn on Recording in a Group Room, set the RecordParticipantsOnConnect property to true when creating the Room. Check the Rooms REST API documentation for additional information.

Base URL

All Recording resources are located beneath the following Base URL.

https://video.twilio.com

Recording instance resource

Recordings captured by Programmable Video products are single-track, single-media and stored in a single file format.

Recordings are represented through a REST API with the following URI scheme:

 /v1/Recordings/{RecordingSid}

Resource properties

A Recording has the following properties:

Property Description
AccountSid The Twilio AccountSid associated with this recording.
Status The status of the Recording. Possible values are processing, completed, or deleted. processing indicates the Recording is still being captured; completed indicates the Recording has been captured and is now available for download. deleted means the recording media has been deleted from the system, but its metadata is still available for historical purposes.
DateCreated Date confirming to UTC ISO 8601 Timestamp. Matches the time the media recording began writing.
Sid RTxx…xx A system-generated 34-character string that uniquely identifies this Recording.
SourceSid Identifies the source of the Recording. For Room Recording, this field stores the TrackSid.
GroupingSids A list of Sids related to this Recording. Includes the RoomSid and ParticipantSid.
Size Size of the recorded track, in bytes.
Uri The URI for this resource, relative to https://video.twilio.com
Type Indicates the media type for this recording. Can be either audio or video .
Duration Duration of the Recording in seconds
ContainerFormat The file format for this Recording. Video Room recordings are captured in Matroska container format, so this will be set to mka for audio files and mkv for video files.
Codec The codec used to encode the track. Currently supported codecs include: VP8, H264, OPUS, and PCMU.

HTTP GET

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video
  .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then(recording => {
    console.log(recording.type);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recording = RecordingResource.Fetch(recordingSid);

        Console.WriteLine(recording.Sid);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recording = $client->video->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

echo $recording->type;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recording = client.video.recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
  .fetch()

puts recording.type
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recording = client.video \
    .recordings('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .fetch()

print(recording.type)
import com.twilio.Twilio;
import com.twilio.rest.video.v1.Recording;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        Recording recording = Recording.fetcher("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                .fetch();

        System.out.println(recording.getType());
    }
}
curl 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "status": "processing",
    "date_created": "2015-07-30T20:00:00Z",
    "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "size": 0,
    "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "type": "audio",
    "duration": 0,
    "container_format": "mka",
    "codec": "OPUS",
    "grouping_sids": {
        "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
    }
}
Retrieve a Recording

HTTP GET to /Media subresource

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const Twilio = require("twilio");
const request = require("request");

const apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const apiKeySecret = "your_api_key_secret";
const accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

const recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const uri = `https://video.twilio.com/v1/Recordings/${recordingSid}/Media`;
client.request({ method: "GET", uri: uri }).then(response => {
  const mediaLocation = JSON.parse(response.body).location;
  request.get(mediaLocation, (err, res, media) => {
    console.log(media);
  });
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using System.Net;
using Newtonsoft.Json;
using Twilio;
using Twilio.Http;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        TwilioClient.Init(apiKeySid, apiKeySecret);

        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        var uri = $"https://video.twilio.com/v1/Recordings/{recordingSid}/Media";
        var response = TwilioClient.GetRestClient().Request(new Request(HttpMethod.Get, uri));
        var mediaLocation =
            JsonConvert.DeserializeObject<Dictionary<string, string>>(response.Content)["location"];

        using (var webClient = new WebClient())
        {
            string mediaContent = webClient.DownloadString(mediaLocation);
            Console.WriteLine(mediaContent);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once "/path/to/vendor/autoload.php"; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_api_key_secret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$uri = "https://video.twilio.com/v1/Recordings/$recordingSid/Media";
$response = $client->request("GET", $uri);
$mediaLocation = json_decode($response->content)["location"];

$media_content = file_get_contents($mediaLocation);
print_r($media_content);
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'
require 'net/http'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new(api_key_sid, api_key_secret)

recording_sid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
uri = "https://video.twilio.com/v1/Recordings/#{recording_sid}/Media"
response = client.request(method: 'GET', uri: uri)
media_location = JSON.parse(response.body)['location']

media_content = Net::HTTP.get(URI(media_location))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
import urllib2

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recording_sid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
uri = "https://video.twilio.com/v1/Recordings/{}/Media".format(recording_sid)
response = client.request("GET", uri)
media_location = json.loads(response.text).get("location")

media_content = urllib2.urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import com.twilio.Twilio;

import org.json.JSONObject;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        TwilioRestClient restClient = Twilio.getRestClient();
        Request request = new Request(
                HttpMethod.GET,
                Domains.VIDEO.toString(),
                "/v1/Recordings/" + recordingSid + "/Media/",
                restClient.getRegion()
        );
        Response response = restClient.request(request);
        JSONObject json = new JSONObject(response.getStream());
        String mediaLocation = json.getString("location");

        System.out.println(mediaLocation);
    }
}
curl 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "location": "https://com.twilio.dev-us1.video.recording.s3.amazonaws.com/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Retrieve the actual recording Media

When you make a request to this URL, Twilio will generate a temporary URL for accessing this binary data, and issue an HTTP 302 redirect response to your request. The Recording will be returned in the format as described in the metadata, with the Content-Type header set accordingly.

The URL returned will only be available for 60 minutes. If the recording is not available (for example, if its status is processing or deleted), an HTTP 404 response is returned.

NOTE: You can play these recordings in media players that support the Matroska file format, like the VLC player. You can also use other programs like Chrome, ffplay or ffplayer to play these recordings.

HTTP POST

Not supported.

HTTP DELETE

Deletes the recording media file.

The metadata for the Recording is preserved, and its Status is set to deleted . By default, Recordings with deleted status are not returned when retrieving the Recordings list. To retrieve deleted Recordings, use the Status=deleted filter.

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .remove().then((response) => {
    console.log(response);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var deleted = RecordingResource.Delete(recordingSid);

        Console.WriteLine(deleted);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$deleted = $client->video->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();

echo $deleted;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

client.video.recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

did_delete = client.video \
                   .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
                   .delete()

print(did_delete)
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Recording;

public class Example {

    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        boolean didDelete = Recording.deleter("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .delete();

        System.out.println(didDelete);
    }
}
curl -X DELETE 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' 
A successful request returns an HTTP status code 204 and an empty body
Delete a Recording

Recordings List Resource

Recordings list is available at the following URI:

 /v1/Recordings

HTTP GET

Returns a list of all Track Recordings with paging data.

HTTP GET: List filters

Parameter Description
SourceSid Filter the Recordings list for any Recordings that have the indicated SourceSid (you can use this to filter Recordings by TrackSid for Video Room Recordings.
Status Filter the Recordings list by status. Note: Recordings with deleted status are not returned by default; they can only be retrieved by filtering the Recordings list to Status=deleted .
GroupingSid Filter by one or more GroupingSids, which may include a ParticipantSid and/or a RoomSid.

Example 1: Get the list of Recordings for the specified Room

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings.list({
  groupingSid: ['RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX']
}).then((rooms) => {
  rooms.forEach(room => console.log(room));
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            groupingSid: new List<string>() {roomSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recordings_in_room = client.video.recordings.list(
  grouping_sid: ['RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

recordings_in_room.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video \
             .recordings \
             .list(grouping_sid='RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {

    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").read();

        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }

    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
Get all Recordings from a given Room
Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video.recordings
  .list({
    groupingSid: 'ParticipantSid',
  })
  .then(rooms => {
    rooms.forEach(room => console.log(room));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string participantSid = "ParticipantSid";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted,
            groupingSid: new List<string>() {participantSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => "ParticipantSid"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

participant_recordings = client.video.recordings
                               .list(grouping_sid: 'ParticipantSid')

participant_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video.recordings \
    .list(grouping_sid='ParticipantSid')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
                .setGroupingSid("ParticipantSid")
                .read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid=ParticipantSid' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
Get all Recordings for a given Participant
Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video.recordings
  .list({
    groupingSid: ['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'],
  })
  .then(rooms => {
    rooms.forEach(room => console.log(room));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string participantSid = "ParticipantSid";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted,
            groupingSid: new List<string>() {participantSid, roomSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => ["ParticipantSid", "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recordings_in_room = client.video.recordings.list(
  grouping_sid: ['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

recordings_in_room.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video \
    .recordings \
    .list(grouping_sid=['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;
import java.util.Arrays;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String participantSid = "ParticipantSid";

        ResourceSet<Recording> recordings = Recording.reader()
                .setGroupingSid(Arrays.asList(roomSid, participantSid))
                .read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid={ParticipantSid}&GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
Get all Recordings for a given Participant in a given Room
Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings.list({
  status: 'deleted'
}).then((rooms) => {
  rooms.forEach(room => console.log(room));
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted);

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "status" => "deleted"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

deleted_recordings = client.video.recordings.list(status: 'deleted')

deleted_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video.recordings.list(status='deleted')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
                .setStatus(Recording.Status.DELETED).read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?Status=deleted' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
Get the list of deleted Recordings

HTTP POST Not supported.

HTTP DELETE Not supported.

Using the Rooms API to find Recordings

To make it easier for customers to find the Recordings from a certain Room, we provide the following affordances for list filtering via the Rooms API:

Filter Recordings by Room

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').recordings.list()
  .then((recordings) => {
    recordings.forEach(recording => console.log(recording.sid));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RoomRecordingResource.Read(roomSid);

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomRecordings = $client
    ->video->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->recordings->read();

foreach ($roomRecordings as $roomRecording) {
    echo $roomRecording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

room_recordings = client.video.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                              .recordings.list()

room_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_recordings = client.video.rooms(sid="RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
                              .recordings.list()

for recording in room_recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.room.RoomRecording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {
        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<RoomRecording> roomRecordings = RoomRecording
                .reader("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").read();

        for (RoomRecording roomRecording : roomRecordings) {
            System.out.println(roomRecording.getSid());
        }

    }
}
curl -G 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
Get all Recordings from a given Room

HTTP GET

Returns a representation of the metadata for the Recording identified by RecordingSid .

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then((recording) => {
    console.log(recording.type);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recording = RoomRecordingResource.Fetch(roomSid, recordingSid);

        Console.WriteLine(recording.Type);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomRecording = $client->video
    ->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();

echo $roomRecording->sid;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

room_recording = client.video
  .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
  .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()

puts room_recording.sid
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_recording = client.video \
  .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
  .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()

print(room_recording.type)
import com.twilio.Twilio;
import com.twilio.rest.video.v1.room.RoomRecording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {
        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        RoomRecording roomRecording = RoomRecording
                .fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(roomRecording.getType());
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "status": "processing",
    "date_created": "2015-07-30T20:00:00Z",
    "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "size": 0,
    "type": "audio",
    "duration": 0,
    "container_format": "mka",
    "codec": "OPUS",
    "grouping_sids": {
        "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "links": {
        "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
    }
}
Retrieve a Recording

HTTP GET to /Media subresource

Loading Code Samples...
Language
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const Twilio = require('twilio');
const request = require('request');

const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

const roomSid = 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const recordingSid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const uri = 'https://video.twilio.com/v1/' +
            `Rooms/${roomSid}/` +
            `Recordings/${recordingSid}` +
            '/Media';
const response = client.request({ method: "POST", uri: uri });
const mediaLocation = JSON.parse(response.body).location;

request.get(mediaLocation, (err, res, media) => {
  console.log(media);
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Net;
using Twilio;
using Twilio.Http;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        TwilioClient.Init(apiKeySid, apiKeySecret);

        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string uri = "https://video.twilio.com/v1/" +
                          $"Rooms/{roomSid}/" +
                          $"Recordings/{recordingSid}/" +
                           "Media/";
        var response = TwilioClient.GetRestClient().Request(new Request(HttpMethod.Get, uri));
        var media_location = JsonConvert.DeserializeObject<Dictionary<string, string>>(response.Content)["location"];

        using(var webClient = new WebClient()) {
            string media_content = webClient.DownloadString(media_location);
            Console.WriteLine(media_content);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$uri = "https://video.twilio.com/v1/" +
       "Rooms/$roomSid/" +
       "Recordings/$recordingSid/" +
       "Media/";
$response = $client->request("POST", $uri);
$mediaLocation = json_decode($response->content)["location"];

$media_content = file_get_contents($mediaLocation);
print_r($media_content);
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'
require 'net/http'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new(api_key_sid, api_key_secret)

room_sid = 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
recording_sid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
uri = 'https://video.twilio.com/v1/' +
      "Rooms/#{room_sid}/" +
      "Recordings/#{recording_sid}/" +
      'Media'
response = client.request(method: 'POST', uri: uri)
media_location = JSON.parse(response.body)['location']

media_content = Net::HTTP.get(URI(media_location))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
import urllib2

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_sid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
recording_sid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
uri = "https://video.twilio.com/v1/" +\
      "Rooms/{}/" +\
      "Recordings/{}/" +\
      "Media".format(room_sid, recording_sid)
response = client.request("POST", uri)
media_location = json.loads(response.text).get("location")

media_content = urllib2.urlopen(media_location).read()
print(media_content)
import org.json.JSONObject;
import com.twilio.Twilio;
import com.twilio.rest.video.v1.Recording;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        TwilioRestClient restClient = Twilio.getRestClient();
        Request request = new Request(
            HttpMethod.POST,
            Domains.VIDEO.toString(),
            "/v1/Rooms/" + roomSid +
            "/Recordings/" + recordingSid +
            "/Media/",
            restClient.getRegion()
        );
        Response response = restClient.request(request);
        String mediaLocation = json.getJSONObject(response.getStream()).getString("location");

        System.out.println(mediaLocation);
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "location": "https://com.twilio.us1.video.recording.s3.amazonaws.com/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
Retrieve the actual recording Media

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

1 / 1
Loading Code Samples...
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video
  .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then(recording => {
    console.log(recording.type);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recording = RecordingResource.Fetch(recordingSid);

        Console.WriteLine(recording.Sid);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recording = $client->video->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->fetch();

echo $recording->type;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recording = client.video.recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
  .fetch()

puts recording.type
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recording = client.video \
    .recordings('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
    .fetch()

print(recording.type)
import com.twilio.Twilio;
import com.twilio.rest.video.v1.Recording;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        Recording recording = Recording.fetcher("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                .fetch();

        System.out.println(recording.getType());
    }
}
curl 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "status": "processing",
    "date_created": "2015-07-30T20:00:00Z",
    "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "size": 0,
    "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "type": "audio",
    "duration": 0,
    "container_format": "mka",
    "codec": "OPUS",
    "grouping_sids": {
        "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const Twilio = require("twilio");
const request = require("request");

const apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const apiKeySecret = "your_api_key_secret";
const accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

const recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
const uri = `https://video.twilio.com/v1/Recordings/${recordingSid}/Media`;
client.request({ method: "GET", uri: uri }).then(response => {
  const mediaLocation = JSON.parse(response.body).location;
  request.get(mediaLocation, (err, res, media) => {
    console.log(media);
  });
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Collections.Generic;
using System.Net;
using Newtonsoft.Json;
using Twilio;
using Twilio.Http;

class Example
{
    static void Main(string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        TwilioClient.Init(apiKeySid, apiKeySecret);

        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        var uri = $"https://video.twilio.com/v1/Recordings/{recordingSid}/Media";
        var response = TwilioClient.GetRestClient().Request(new Request(HttpMethod.Get, uri));
        var mediaLocation =
            JsonConvert.DeserializeObject<Dictionary<string, string>>(response.Content)["location"];

        using (var webClient = new WebClient())
        {
            string mediaContent = webClient.DownloadString(mediaLocation);
            Console.WriteLine(mediaContent);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once "/path/to/vendor/autoload.php"; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_api_key_secret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$uri = "https://video.twilio.com/v1/Recordings/$recordingSid/Media";
$response = $client->request("GET", $uri);
$mediaLocation = json_decode($response->content)["location"];

$media_content = file_get_contents($mediaLocation);
print_r($media_content);
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'
require 'net/http'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new(api_key_sid, api_key_secret)

recording_sid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
uri = "https://video.twilio.com/v1/Recordings/#{recording_sid}/Media"
response = client.request(method: 'GET', uri: uri)
media_location = JSON.parse(response.body)['location']

media_content = Net::HTTP.get(URI(media_location))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
import urllib2

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recording_sid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
uri = "https://video.twilio.com/v1/Recordings/{}/Media".format(recording_sid)
response = client.request("GET", uri)
media_location = json.loads(response.text).get("location")

media_content = urllib2.urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import com.twilio.Twilio;

import org.json.JSONObject;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        TwilioRestClient restClient = Twilio.getRestClient();
        Request request = new Request(
                HttpMethod.GET,
                Domains.VIDEO.toString(),
                "/v1/Recordings/" + recordingSid + "/Media/",
                restClient.getRegion()
        );
        Response response = restClient.request(request);
        JSONObject json = new JSONObject(response.getStream());
        String mediaLocation = json.getString("location");

        System.out.println(mediaLocation);
    }
}
curl 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "location": "https://com.twilio.dev-us1.video.recording.s3.amazonaws.com/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .remove().then((response) => {
    console.log(response);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var deleted = RecordingResource.Delete(recordingSid);

        Console.WriteLine(deleted);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$deleted = $client->video->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->delete();

echo $deleted;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

client.video.recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

did_delete = client.video \
                   .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
                   .delete()

print(did_delete)
import com.twilio.Twilio;
import com.twilio.rest.api.v2010.account.Recording;

public class Example {

    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        boolean didDelete = Recording.deleter("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .delete();

        System.out.println(didDelete);
    }
}
curl -X DELETE 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' 
A successful request returns an HTTP status code 204 and an empty body
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings.list({
  groupingSid: ['RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX']
}).then((rooms) => {
  rooms.forEach(room => console.log(room));
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            groupingSid: new List<string>() {roomSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recordings_in_room = client.video.recordings.list(
  grouping_sid: ['RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

recordings_in_room.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video \
             .recordings \
             .list(grouping_sid='RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {

    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").read();

        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }

    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video.recordings
  .list({
    groupingSid: 'ParticipantSid',
  })
  .then(rooms => {
    rooms.forEach(room => console.log(room));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string participantSid = "ParticipantSid";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted,
            groupingSid: new List<string>() {participantSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => "ParticipantSid"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

participant_recordings = client.video.recordings
                               .list(grouping_sid: 'ParticipantSid')

participant_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video.recordings \
    .list(grouping_sid='ParticipantSid')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
                .setGroupingSid("ParticipantSid")
                .read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid=ParticipantSid' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const Twilio = require('twilio');

const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

client.video.recordings
  .list({
    groupingSid: ['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'],
  })
  .then(rooms => {
    rooms.forEach(room => console.log(room));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;
using System.Collections.Generic;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string participantSid = "ParticipantSid";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted,
            groupingSid: new List<string>() {participantSid, roomSid});

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "groupingSid" => ["ParticipantSid", "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

recordings_in_room = client.video.recordings.list(
  grouping_sid: ['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

recordings_in_room.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video \
    .recordings \
    .list(grouping_sid=['ParticipantSid', 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'])

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;
import java.util.Arrays;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String participantSid = "ParticipantSid";

        ResourceSet<Recording> recordings = Recording.reader()
                .setGroupingSid(Arrays.asList(roomSid, participantSid))
                .read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?GroupingSid={ParticipantSid}&GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.recordings.list({
  status: 'deleted'
}).then((rooms) => {
  rooms.forEach(room => console.log(room));
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RecordingResource.Read(
            status: RecordingResource.StatusEnum.Deleted);

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$recordings = $client->video->recordings
    ->read([
      "status" => "deleted"
    ]);

foreach ($recordings as $recording) {
    echo $recording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

deleted_recordings = client.video.recordings.list(status: 'deleted')

deleted_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

recordings = client.video.recordings.list(status='deleted')

for recording in recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<Recording> recordings = Recording.reader()
                .setStatus(Recording.Status.DELETED).read();

        // Loop over rooms and print out a property for each one.
        for (Recording recording : recordings) {
            System.out.println(recording.getSid());
        }
    }
}
curl -G 'https://video.twilio.com/v1/Recordings?Status=deleted' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').recordings.list()
  .then((recordings) => {
    recordings.forEach(recording => console.log(recording.sid));
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recordings = RoomRecordingResource.Read(roomSid);

        foreach (var recording in recordings)
        {
            Console.WriteLine(recording.Sid);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomRecordings = $client
    ->video->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->recordings->read();

foreach ($roomRecordings as $roomRecording) {
    echo $roomRecording->sid;
}
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

room_recordings = client.video.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                              .recordings.list()

room_recordings.each do |recording|
  puts recording.sid
end
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_recordings = client.video.rooms(sid="RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
                              .recordings.list()

for recording in room_recordings:
    print(recording.sid)
import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.rest.video.v1.room.RoomRecording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {
        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        ResourceSet<RoomRecording> roomRecordings = RoomRecording
                .reader("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").read();

        for (RoomRecording roomRecording : roomRecordings) {
            System.out.println(roomRecording.getSid());
        }

    }
}
curl -G 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "recordings": [
        {
            "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "status": "completed",
            "date_created": "2015-07-30T20:00:00Z",
            "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "size": 0,
            "type": "audio",
            "duration": 0,
            "container_format": "mka",
            "codec": "OPUS",
            "grouping_sids": {
                "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            },
            "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            "links": {
                "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
            }
        }
    ],
    "meta": {
        "page": 0,
        "count": 1,
        "page_size": 50,
        "first_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
        "previous_page_url": null,
        "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
        "next_page_url": null,
        "key": "recordings"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
var apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var apiKeySecret = 'your_api_key_secret';
var accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
var Twilio = require('twilio');

var client = new Twilio(apiKeySid, apiKeySecret, {accountSid: accountSid});

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
  .fetch()
  .then((recording) => {
    console.log(recording.type);
  });
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";

        TwilioClient.Init(apiKeySid, apiKeySecret);

        var recording = RoomRecordingResource.Fetch(roomSid, recordingSid);

        Console.WriteLine(recording.Type);
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomRecording = $client->video
    ->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
    ->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")->fetch();

echo $roomRecording->sid;
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new api_key_sid, api_key_secret

room_recording = client.video
  .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
  .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()

puts room_recording.sid
# Download the Python helper library from twilio.com/docs/python/install
from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_recording = client.video \
  .rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
  .recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()

print(room_recording.type)
import com.twilio.Twilio;
import com.twilio.rest.video.v1.room.RoomRecording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {
        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        RoomRecording roomRecording = RoomRecording
                .fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                        "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch();

        System.out.println(roomRecording.getType());
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "api_key_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "status": "processing",
    "date_created": "2015-07-30T20:00:00Z",
    "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "size": 0,
    "type": "audio",
    "duration": 0,
    "container_format": "mka",
    "codec": "OPUS",
    "grouping_sids": {
        "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "room_sid" : "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "links": {
        "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
    }
}
SDK Version:
  • 5.x
Response Format:
  • json
SDK Version:
  • 7.x
SDK Version:
  • 3.x
SDK Version:
  • 5.x
SDK Version:
  • 6.x
SDK Version:
  • 5.x
Format:
  • JSON
// NOTE: This example uses the next generation Twilio helper library - for more
// information on how to download and install this version, visit
// https://www.twilio.com/docs/libraries/node
const Twilio = require('twilio');
const request = require('request');

const apiKeySid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const apiKeySecret = 'your_api_key_secret';
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const client = new Twilio(apiKeySid, apiKeySecret, { accountSid: accountSid });

const roomSid = 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const recordingSid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const uri = 'https://video.twilio.com/v1/' +
            `Rooms/${roomSid}/` +
            `Recordings/${recordingSid}` +
            '/Media';
const response = client.request({ method: "POST", uri: uri });
const mediaLocation = JSON.parse(response.body).location;

request.get(mediaLocation, (err, res, media) => {
  console.log(media);
});
// Download the twilio-csharp library from twilio.com/docs/libraries/csharp
using System;
using System.Net;
using Twilio;
using Twilio.Http;

class Example
{
    static void Main (string[] args)
    {
        // Find your Account SID and Auth Token at twilio.com/console
        const string apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string apiKeySecret = "your_api_key_secret";
        TwilioClient.Init(apiKeySid, apiKeySecret);

        const string roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string uri = "https://video.twilio.com/v1/" +
                          $"Rooms/{roomSid}/" +
                          $"Recordings/{recordingSid}/" +
                           "Media/";
        var response = TwilioClient.GetRestClient().Request(new Request(HttpMethod.Get, uri));
        var media_location = JsonConvert.DeserializeObject<Dictionary<string, string>>(response.Content)["location"];

        using(var webClient = new WebClient()) {
            string media_content = webClient.DownloadString(media_location);
            Console.WriteLine(media_content);
        }
    }
}
<?php
// Get the PHP helper library from twilio.com/docs/php/install
require_once '/path/to/vendor/autoload.php'; // Loads the library
use Twilio\Rest\Client;

// Your Account Sid and Auth Token from twilio.com/console
$apiKeySid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$apiKeySecret = "your_auth_apiKeySecret";
$client = new Client($apiKeySid, $apiKeySecret);

$roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$uri = "https://video.twilio.com/v1/" +
       "Rooms/$roomSid/" +
       "Recordings/$recordingSid/" +
       "Media/";
$response = $client->request("POST", $uri);
$mediaLocation = json_decode($response->content)["location"];

$media_content = file_get_contents($mediaLocation);
print_r($media_content);
# Download the Ruby helper library from twilio.com/docs/libraries/ruby
require 'twilio-ruby'
require 'net/http'

# Get your Account Sid and Auth Token from https://www.twilio.com/console
api_key_sid = 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
api_key_secret = 'your_api_key_secret'

client = Twilio::REST::Client.new(api_key_sid, api_key_secret)

room_sid = 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
recording_sid = 'RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
uri = 'https://video.twilio.com/v1/' +
      "Rooms/#{room_sid}/" +
      "Recordings/#{recording_sid}/" +
      'Media'
response = client.request(method: 'POST', uri: uri)
media_location = JSON.parse(response.body)['location']

media_content = Net::HTTP.get(URI(media_location))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
import urllib2

from twilio.rest import Client

# Your Account Sid and Auth Token from twilio.com/console
api_key_sid = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
api_key_secret = "your_api_key_secret"
client = Client(api_key_sid, api_key_secret)

room_sid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
recording_sid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
uri = "https://video.twilio.com/v1/" +\
      "Rooms/{}/" +\
      "Recordings/{}/" +\
      "Media".format(room_sid, recording_sid)
response = client.request("POST", uri)
media_location = json.loads(response.text).get("location")

media_content = urllib2.urlopen(media_location).read()
print(media_content)
import org.json.JSONObject;
import com.twilio.Twilio;
import com.twilio.rest.video.v1.Recording;


public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String API_KEY_SID = "SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String API_KEY_SECRET = "your_api_key_secret";

    public static void main(String args[]) {

        // Initialize the client
        Twilio.init(API_KEY_SID, API_KEY_SECRET);

        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        TwilioRestClient restClient = Twilio.getRestClient();
        Request request = new Request(
            HttpMethod.POST,
            Domains.VIDEO.toString(),
            "/v1/Rooms/" + roomSid +
            "/Recordings/" + recordingSid +
            "/Media/",
            restClient.getRegion()
        );
        Response response = restClient.request(request);
        String mediaLocation = json.getJSONObject(response.getStream()).getString("location");

        System.out.println(mediaLocation);
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
{
    "location": "https://com.twilio.us1.video.recording.s3.amazonaws.com/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}