Rest API: Recordings

Overview

Twilio Video’s Group Rooms and Recording APIs enable you to record the audio and video shared 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.

All Recording resources are located beneath the following Base URL.

https://video.twilio.com

Contents

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:

Name Description
account_sid

The unique SID identifier of the Twilio Account. (not PII)

codec

The codec used to encode the track. Currently supported codecs include: VP8, H264, OPUS, and PCMU. (not PII)

container_format

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. (not PII)

date_created

Date conforming to UTC ISO 8601 Timestamp. Matches the time the media recording began writing. (not PII)

duration

Duration of the Recording in seconds rounded to the nearest second. Thus, sub-second duration tracks have a Duration property of 1 second (not PII)

grouping_sids

A list of Sids related to this Recording. Includes the RoomSid and ParticipantSid. (not PII)

sid

RTxx…xx A system-generated 34-character string that uniquely identifies this Recording. (not PII)

size

Size of the recorded track, in bytes. (not PII)

source_sid

Identifies the source of the Recording. For Room Recording, this field stores the TrackSid. (not PII)

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. (not PII)

track_name

The name that was given to the source track of this recording. If no name is given, the SourceSid is used. (🔐 PII MTL: 30 days)

type

Indicates the media type for this recording. Can be either audio or video. (not PII)

url

The absolute URL for this resource. (not PII)

Note: The duration of media tracks is rounded to the nearest second. Thus, sub-second duration tracks have a Duration property of 1 second.

HTTP GET

Returns a single Recording Instance resource identified by a RecordingSid.

Example: Retrieve a Recording

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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .fetch()
            .then(recording => console.log(recording.trackName))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recording = RecordingResource.Fetch(
            pathSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(recording.TrackName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recording = $twilio->video->v1->recordings("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                               ->fetch();

print($recording->trackName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

puts recording.track_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

print(recording.track_name)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Recording recording = 
            Recording.fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(recording.getTrackName());
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "processing",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T21:00:00Z",
  "date_deleted": "2015-07-30T22:00:00Z",
  "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "source_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "size": 0,
  "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "type": "audio",
  "duration": 0,
  "container_format": "mka",
  "codec": "OPUS",
  "track_name": "A name",
  "grouping_sids": {
    "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
  "encryption_key": "public_key",
  "links": {
    "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
  }
}
Retrieve a Recording

HTTP GET to the /Media subresource

Retrieves the media file associated to a given Recording Instance resource identified by a RecordingSid

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 according to the codec used to record the media

Codec Content-Type value
VP8 video/webm
OPUS audio/webm
PCMU audio/x-matroska
H264 video/x-matroska

The URL returned will only be available for 60 minutes, but a different expiration can be specified via the Ttl request param. If the composition is not yet available, a 404 is returned. If the recording is not available (for example, if its status is processing or deleted), an HTTP 404 response is returned.

The HTTP GET request accepts the following parameters

Name Description
ContentDisposition Optional. Sets the Content-Disposition header of the redirect_to URL. Possible values are attachment or inline. Default value attachment%3B%20filename%3D%22RTxxx.mk{a|v} (not PII)
Ttl Optional. Duration in seconds for which the redirect_to URL can be used to retrieve the media file. The maximum expiration time is 7 days (604800) (not PII)

The Content-Disposition header can be set in this request. By default, the value of this header is attachment%3B%20filename%3D%22RTxxx.mk{a|v}.

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.

Example: Retrieve a Recording's Media

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).redirect_to;
  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.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;

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";
        const string uri = $"https://video.twilio.com/v1/Recordings/{recordingSid}/Media";

        var request = (HttpWebRequest)WebRequest.Create(uri);
        request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiKeySid + ":" + apiKeySecret)));
        request.AllowAutoRedirect = false;
        string responseBody = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
        var mediaLocation = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseBody)["redirect_to"];

        Console.WriteLine(mediaLocation);
        new WebClient().DownloadFile(mediaLocation, $"{recordingSid}.out");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
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 = $response->getContent()["redirect_to"];

$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('video.twilio.com', 443, 'GET', uri)
media_content = Net::HTTP.get(URI(response.body['redirect_to']))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
from urllib.request import urlopen

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("redirect_to")

media_content = urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.NetworkHttpClient;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import org.apache.commons.io.IOUtils;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.JSONObject;

import java.io.IOException;


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[]) throws IOException {
        // Disable HttpClient follow redirect by default
        HttpClientBuilder clientBuilder = HttpClientBuilder.create();
        clientBuilder.disableRedirectHandling();

        // Initialize the client
        TwilioRestClient restClient = new TwilioRestClient
                .Builder(API_KEY_SID, API_KEY_SECRET)
                .httpClient(new NetworkHttpClient(clientBuilder))
                .build();

        // Retrieve media location
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        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.getContent());
        String mediaLocation = json.getString("redirect_to");

        // Retrieve media content
        String mediaContent = org.apache.http.client.fluent.Request
                .Get(mediaLocation)
                .execute()
                .handleResponse((r) ->
                        IOUtils.toString(r.getEntity().getContent()));

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

HTTP POST

Not supported.

HTTP DELETE

Deletes the recording media file.

The metadata for the Recording is preserved for a period of 30 days, and its Status is set to deleted. After this period, the metadata will not be available. By default, Recordings with deleted status are not returned when retrieving the Recordings list. To retrieve deleted Recordings, use the Status=deleted filter.

Note that the 30 day period starts after the Status is set to deleted. After this period expires, the metadata will not be available.

Example: Delete a Recording

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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .remove()
            .then(recording => console.log(recording.sid))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        RecordingResource.Delete(pathSid: "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->video->v1->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                  ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Recording.deleter("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete();
    }
}
curl -X DELETE https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
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

The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive.

Name Description
DateCreatedAfter

Optional. Only show Recordings that started on or after this ISO8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm. (not PII)

DateCreatedBefore

Optional. Only show Recordings that started before this this ISO8601 date-time, given as YYYY-MM-DDThh:mm:ss-hh:mm. (not PII)

GroupingSid

Optional. Only show Recordings that have this GroupingSid, which may include a ParticipantSid and/or a RoomSid. (not PII)

SourceSid

Optional. Only show the Recordings with the given source Sid (you can use this to filter Recordings by TrackSid for Video Room Recordings. (not PII)

Status

Optional. Only show Recordings with the given status. (not PII)

Note: deleted Recordings are not returned by default. For retrieving the deleted Recordings list you must explicitly specify Status=deleted.

Example: Get all Recordings for 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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          groupingSid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Converters;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RecordingResource.Read(
            groupingSid: Promoter.ListOfOne("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array(
                                           "groupingSid" => "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                                       )
                                );

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

recordings = @client.video
                    .recordings
                    .list(grouping_sid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.converter.Promoter;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid(
                Promoter.listOfOne("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
            .read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "grouping_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          groupingSid: 'ParticipantSid'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Converters;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RecordingResource.Read(
            groupingSid: Promoter.ListOfOne("ParticipantSid")
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array("groupingSid" => "ParticipantSid")
                                );

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.converter.Promoter;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid(Promoter.listOfOne("ParticipantSid"))
            .read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?GroupingSid=ParticipantSid' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "grouping_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          status: 'deleted'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

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

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array("status" => "deleted"));

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setStatus(Recording.Status.DELETED).read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?Status=deleted' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "status": "deleted"
}
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:

Example: Get all recordings from a given Room using the Rooms API

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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .recordings
            .each(recordings => console.log(recordings.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RoomRecordingResource.Read(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                ->recordings
                                ->read();

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

recordings = @client.video
                    .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                    .recordings
                    .list

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

recordings = client.video \
                   .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                   .recordings \
                   .list()

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<RoomRecording> recordings = 
            RoomRecording.reader("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .read();

        for(RoomRecording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .fetch()
            .then(room_recording => console.log(room_recording.trackName))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var roomRecording = RoomRecordingResource.Fetch(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(roomRecording.TrackName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$room_recording = $twilio->video->v1->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                    ->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                    ->fetch();

print($room_recording->trackName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

puts room_recording.track_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

print(room_recording.track_name)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        RoomRecording roomRecording = RoomRecording.fetcher(
                "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(roomRecording.getTrackName());
    }
}
curl -X GET 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "processing",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T21:00:00Z",
  "date_deleted": "2015-07-30T22:00:00Z",
  "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "source_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "size": 0,
  "type": "audio",
  "duration": 0,
  "container_format": "mka",
  "codec": "OPUS",
  "track_name": "A name",
  "grouping_sids": {
    "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
  "encryption_key": "public_key",
  "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "links": {
    "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
  }
}
Retrieve a Recording
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';
client.request({ method: "GET", uri: uri }).then(response => {
  const mediaLocation = JSON.parse(response.body).redirect_to;
  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.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;

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 = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string uri = "https://video.twilio.com/v1/" +
                          $"Rooms/{roomSid}/" +
                          $"Recordings/{recordingSid}/" +
                           "Media/";

        var request = (HttpWebRequest)WebRequest.Create(uri);
        request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiKeySid + ":" + apiKeySecret)));
        request.AllowAutoRedirect = false;
        string responseBody = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
        var mediaLocation = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseBody)["redirect_to"];

        Console.WriteLine(mediaLocation);
        new WebClient().DownloadFile(mediaLocation, $"{recordingSid}.out");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
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("GET", $uri);
$mediaLocation = $response->getContent()["redirect_to"];

$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('video.twilio.com', 443, 'GET', uri)
media_location = response.body['redirect_to']

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

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("GET", uri)
media_location = json.loads(response.text).get("redirect_to")

media_content = urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.NetworkHttpClient;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import org.apache.commons.io.IOUtils;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.JSONObject;

import java.io.IOException;


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[]) throws IOException {
        // Disable HttpClient follow redirect by default
        HttpClientBuilder clientBuilder = HttpClientBuilder.create();
        clientBuilder.disableRedirectHandling();

        // Initialize the client
        TwilioRestClient restClient = new TwilioRestClient
                .Builder(API_KEY_SID, API_KEY_SECRET)
                .httpClient(new NetworkHttpClient(clientBuilder))
                .build();

        // Retrieve media location
        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        Request request = new Request(
            HttpMethod.GET,
            Domains.VIDEO.toString(),
            "/v1/Rooms/" + roomSid +
            "/Recordings/" + recordingSid +
            "/Media/",
            restClient.getRegion()
        );
        Response response = restClient.request(request);
        JSONObject json = new JSONObject(response.getContent());
        String mediaLocation = json.getString("redirect_to");

        // Retrieve media content
        String mediaContent = org.apache.http.client.fluent.Request
                .Get(mediaLocation)
                .execute()
                .handleResponse((r) ->
                        IOUtils.toString(r.getEntity().getContent()));

        System.out.println(mediaContent);
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
  -L
  --output video.mkv

# Output to an .mkv for video, or an .mka for audio
{
    "redirect_to": "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.

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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .fetch()
            .then(recording => console.log(recording.trackName))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recording = RecordingResource.Fetch(
            pathSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(recording.TrackName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recording = $twilio->video->v1->recordings("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                               ->fetch();

print($recording->trackName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

puts recording.track_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

print(recording.track_name)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Recording recording = 
            Recording.fetcher("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(recording.getTrackName());
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "processing",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T21:00:00Z",
  "date_deleted": "2015-07-30T22:00:00Z",
  "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "source_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "size": 0,
  "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "type": "audio",
  "duration": 0,
  "container_format": "mka",
  "codec": "OPUS",
  "track_name": "A name",
  "grouping_sids": {
    "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
  "encryption_key": "public_key",
  "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).redirect_to;
  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.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;

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";
        const string uri = $"https://video.twilio.com/v1/Recordings/{recordingSid}/Media";

        var request = (HttpWebRequest)WebRequest.Create(uri);
        request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiKeySid + ":" + apiKeySecret)));
        request.AllowAutoRedirect = false;
        string responseBody = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
        var mediaLocation = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseBody)["redirect_to"];

        Console.WriteLine(mediaLocation);
        new WebClient().DownloadFile(mediaLocation, $"{recordingSid}.out");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
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 = $response->getContent()["redirect_to"];

$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('video.twilio.com', 443, 'GET', uri)
media_content = Net::HTTP.get(URI(response.body['redirect_to']))
puts media_content
# Download the Python helper library from twilio.com/docs/python/install
import json
from urllib.request import urlopen

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("redirect_to")

media_content = urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.NetworkHttpClient;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import org.apache.commons.io.IOUtils;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.JSONObject;

import java.io.IOException;


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[]) throws IOException {
        // Disable HttpClient follow redirect by default
        HttpClientBuilder clientBuilder = HttpClientBuilder.create();
        clientBuilder.disableRedirectHandling();

        // Initialize the client
        TwilioRestClient restClient = new TwilioRestClient
                .Builder(API_KEY_SID, API_KEY_SECRET)
                .httpClient(new NetworkHttpClient(clientBuilder))
                .build();

        // Retrieve media location
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        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.getContent());
        String mediaLocation = json.getString("redirect_to");

        // Retrieve media content
        String mediaContent = org.apache.http.client.fluent.Request
                .Get(mediaLocation)
                .execute()
                .handleResponse((r) ->
                        IOUtils.toString(r.getEntity().getContent()));

        System.out.println(mediaContent);
    }
}
curl 'https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret' \
{
    "redirect_to": "https://com-twilio-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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .remove()
            .then(recording => console.log(recording.sid))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        RecordingResource.Delete(pathSid: "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$twilio->video->v1->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                  ->delete();
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

@client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

client.video.recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX').delete()
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        Recording.deleter("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete();
    }
}
curl -X DELETE https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          groupingSid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Converters;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RecordingResource.Read(
            groupingSid: Promoter.ListOfOne("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array(
                                           "groupingSid" => "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
                                       )
                                );

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

recordings = @client.video
                    .recordings
                    .list(grouping_sid: 'RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.converter.Promoter;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid(
                Promoter.listOfOne("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"))
            .read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?GroupingSid=RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "grouping_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          groupingSid: 'ParticipantSid'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Converters;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RecordingResource.Read(
            groupingSid: Promoter.ListOfOne("ParticipantSid")
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array("groupingSid" => "ParticipantSid")
                                );

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

import com.twilio.Twilio;
import com.twilio.base.ResourceSet;
import com.twilio.converter.Promoter;
import com.twilio.rest.video.v1.Recording;

public class Example {
    // Find your Account Sid and Token at twilio.com/console
    public static final String ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setGroupingSid(Promoter.listOfOne("ParticipantSid"))
            .read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?GroupingSid=ParticipantSid' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "grouping_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.recordings.each({
                          status: 'deleted'
                        },
                            recordings => console.log(recordings.sid)
                        );
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

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

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->recordings
                                ->read(array("status" => "deleted"));

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<Recording> recordings = Recording.reader()
            .setStatus(Recording.Status.DELETED).read();

        for(Recording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Recordings?Status=deleted' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "url": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "status": "deleted"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .recordings
            .each(recordings => console.log(recordings.sid));
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var recordings = RoomRecordingResource.Read(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        foreach(var record in recordings)
        {
           Console.WriteLine(record.Sid);
        }
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$recordings = $twilio->video->v1->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                ->recordings
                                ->read();

foreach ($recordings as $record) {
    print($record->sid);
}
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

recordings = @client.video
                    .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
                    .recordings
                    .list

recordings.each do |record|
  puts record.sid
end
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

recordings = client.video \
                   .rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') \
                   .recordings \
                   .list()

for record in recordings:
    print(record.sid)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        ResourceSet<RoomRecording> recordings = 
            RoomRecording.reader("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .read();

        for(RoomRecording record : recordings) {
            System.out.println(record.getSid());
        }
    }
}
curl -X GET 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "recordings": [
    {
      "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "status": "completed",
      "date_created": "2015-07-30T20:00:00Z",
      "date_updated": "2015-07-30T21:00:00Z",
      "date_deleted": "2015-07-30T22:00:00Z",
      "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "source_sid": "MTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "size": 23,
      "type": "audio",
      "duration": 10,
      "container_format": "mka",
      "codec": "OPUS",
      "track_name": "A name",
      "grouping_sids": {
        "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "participant_sid": "PAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
      "encryption_key": "public_key",
      "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "links": {
        "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media"
      }
    }
  ],
  "meta": {
    "page": 0,
    "page_size": 50,
    "first_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "previous_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=0",
    "next_page_url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings?PageSize=50&Page=1",
    "key": "recordings"
  },
  "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}
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
// Download the helper library from https://www.twilio.com/docs/node/install
// Your Account Sid and Auth Token from twilio.com/console
const accountSid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
const authToken = 'your_auth_token';
const client = require('twilio')(accountSid, authToken);

client.video.rooms('RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .recordings('RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')
            .fetch()
            .then(room_recording => console.log(room_recording.trackName))
            .done();
// Install the C# / .NET helper library from twilio.com/docs/csharp/install

using System;
using Twilio;
using Twilio.Rest.Video.V1.Room;


class Program 
{
    static void Main(string[] args)
    {
        // Find your Account Sid and Token at twilio.com/console
        const string accountSid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string authToken = "your_auth_token";

        TwilioClient.Init(accountSid, authToken);

        var roomRecording = RoomRecordingResource.Fetch(
            pathRoomSid: "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
            pathSid: "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        );

        Console.WriteLine(roomRecording.TrackName);
    }
}
<?php

// Update the path below to your autoload.php,
// see https://getcomposer.org/doc/01-basic-usage.md
require_once '/path/to/vendor/autoload.php';

use Twilio\Rest\Client;

// Find your Account Sid and Auth Token at twilio.com/console
$sid    = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
$token  = "your_auth_token";
$twilio = new Client($sid, $token);

$room_recording = $twilio->video->v1->rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                    ->recordings("RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
                                    ->fetch();

print($room_recording->trackName);
# Download the helper library from https://www.twilio.com/docs/ruby/install
require 'rubygems'
require 'twilio-ruby'

# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
@client = Twilio::REST::Client.new(account_sid, auth_token)

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

puts room_recording.track_name
# Download the helper library from https://www.twilio.com/docs/python/install
from twilio.rest import Client


# Your Account Sid and Auth Token from twilio.com/console
account_sid = 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
auth_token = 'your_auth_token'
client = Client(account_sid, auth_token)

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

print(room_recording.track_name)
// Install the Java helper library from twilio.com/docs/java/install

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 ACCOUNT_SID = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
    public static final String AUTH_TOKEN = "your_auth_token";

    public static void main(String[] args) {
        Twilio.init(ACCOUNT_SID, AUTH_TOKEN);
        RoomRecording roomRecording = RoomRecording.fetcher(
                "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
            .fetch();

        System.out.println(roomRecording.getTrackName());
    }
}
curl -X GET 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
{
  "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "status": "processing",
  "date_created": "2015-07-30T20:00:00Z",
  "date_updated": "2015-07-30T21:00:00Z",
  "date_deleted": "2015-07-30T22:00:00Z",
  "sid": "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "source_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "size": 0,
  "type": "audio",
  "duration": 0,
  "container_format": "mka",
  "codec": "OPUS",
  "track_name": "A name",
  "grouping_sids": {
    "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  },
  "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
  "encryption_key": "public_key",
  "room_sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "url": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  "links": {
    "media": "https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/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';
client.request({ method: "GET", uri: uri }).then(response => {
  const mediaLocation = JSON.parse(response.body).redirect_to;
  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.IO;
using System.Net;
using System.Text;
using Newtonsoft.Json;

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 = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        const string uri = "https://video.twilio.com/v1/" +
                          $"Rooms/{roomSid}/" +
                          $"Recordings/{recordingSid}/" +
                           "Media/";

        var request = (HttpWebRequest)WebRequest.Create(uri);
        request.Headers.Add("Authorization", "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiKeySid + ":" + apiKeySecret)));
        request.AllowAutoRedirect = false;
        string responseBody = new StreamReader(request.GetResponse().GetResponseStream()).ReadToEnd();
        var mediaLocation = JsonConvert.DeserializeObject<Dictionary<string, string>>(responseBody)["redirect_to"];

        Console.WriteLine(mediaLocation);
        new WebClient().DownloadFile(mediaLocation, $"{recordingSid}.out");
    }
}
<?php
// Get the PHP helper library from https://twilio.com/docs/libraries/php
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("GET", $uri);
$mediaLocation = $response->getContent()["redirect_to"];

$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('video.twilio.com', 443, 'GET', uri)
media_location = response.body['redirect_to']

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

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("GET", uri)
media_location = json.loads(response.text).get("redirect_to")

media_content = urlopen(media_location).read()
print(media_content)
import com.twilio.http.HttpMethod;
import com.twilio.http.NetworkHttpClient;
import com.twilio.http.Request;
import com.twilio.http.Response;
import com.twilio.http.TwilioRestClient;
import com.twilio.rest.Domains;
import org.apache.commons.io.IOUtils;
import org.apache.http.impl.client.HttpClientBuilder;
import org.json.JSONObject;

import java.io.IOException;


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[]) throws IOException {
        // Disable HttpClient follow redirect by default
        HttpClientBuilder clientBuilder = HttpClientBuilder.create();
        clientBuilder.disableRedirectHandling();

        // Initialize the client
        TwilioRestClient restClient = new TwilioRestClient
                .Builder(API_KEY_SID, API_KEY_SECRET)
                .httpClient(new NetworkHttpClient(clientBuilder))
                .build();

        // Retrieve media location
        String roomSid = "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        String recordingSid = "RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
        Request request = new Request(
            HttpMethod.GET,
            Domains.VIDEO.toString(),
            "/v1/Rooms/" + roomSid +
            "/Recordings/" + recordingSid +
            "/Media/",
            restClient.getRegion()
        );
        Response response = restClient.request(request);
        JSONObject json = new JSONObject(response.getContent());
        String mediaLocation = json.getString("redirect_to");

        // Retrieve media content
        String mediaContent = org.apache.http.client.fluent.Request
                .Get(mediaLocation)
                .execute()
                .handleResponse((r) ->
                        IOUtils.toString(r.getEntity().getContent()));

        System.out.println(mediaContent);
    }
}
curl 'https://video.twilio.com/v1/Rooms/RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Recordings/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Media' \
  -u 'SKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_api_key_secret'
  -L
  --output video.mkv

# Output to an .mkv for video, or an .mka for audio
{
    "redirect_to": "https://com.twilio.us1.video.recording.s3.amazonaws.com/RTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}