Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

External S3 Recordings


(warning)

Warning

This page is for reference only. We are no longer onboarding new customers to Programmable Video. Existing customers can continue to use the product until December 5, 2024(link takes you to an external page).
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide(link takes you to an external page) to assist you in minimizing any service disruption.


Overview

overview page anchor

The Twilio Recording Settings REST API lets you configure Twilio to store your recordings in an external AWS S3 bucket. Recording Settings work per-account (i.e. project). If you activate external S3 storage, all Video Recordings in your account (or project) will be stored in the specified external bucket.

This document contains reference information about the Recording Settings REST API for external S3 storage. For a step-by-step guide you can also read the Storing into AWS S3 developer guide



These are the URI schemes for the Recording Settings REST API and the supported methods:

  • /v1/RecordingSettings/Default
    • GET : Retrieves current Recording Settings.
    • POST : Updates the Recording Settings.

Recording Settings instance resource

recording-settings-instance-resource page anchor

The Default RecordingSettings resource holds the default recording settings for the given Twilio account (or project). Its configuration will be applied to all Recordings created in such account (or project).

Base URL

base-url page anchor

The Recording Settings default resource is located at the following Base URL:


_10
https://video.twilio.com/v1/RecordingSettings/Default

A RecordingSettings resource has the following properties:

Resource properties
account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) that created the RecordingSettings resource.


friendly_nametype: stringNot PII

The string that you assigned to describe the resource and show the user in the console


aws_credentials_sidtype: SID<CR>Not PII

The SID of the stored Credential resource.


aws_s3_urltype: string<URI>Not PII

The URL of the AWS S3 bucket where the recordings are stored. We only support DNS-compliant URLs like https://documentation-example-twilio-bucket/recordings, where recordings is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986(link takes you to an external page).


aws_storage_enabledtype: booleanNot PII

Whether all recordings are written to the aws_s3_url. When false, all recordings are stored in our cloud.


encryption_key_sidtype: SID<CR>Not PII

The SID of the Public Key resource used for encryption.


encryption_enabledtype: booleanNot PII

Whether all recordings are stored in an encrypted form. The default is false.


urltype: string<URI>Not PII

The absolute URL of the resource.

In the table above, the following properties are reserved for the feature called Encrypted Recordings:

  • encryption_key_sid
  • encryption_enabled

If you have an interest in activating Encrypted Recordings in your account, please contact the Twilio Support Service.(link takes you to an external page)

HTTP GET: Get Settings

http-get page anchor

Retrieves your account's default Recording Settings.

For example:

Fetch Recording Settings

fetch-recording-settings page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.video.v1.recordingSettings()
_10
.fetch()
_10
.then(recording_settings => console.log(recording_settings.friendlyName));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "string",
_10
"aws_credentials_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"encryption_key_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
_10
"aws_storage_enabled": true,
_10
"encryption_enabled": true,
_10
"url": "https://video.twilio.com/v1/RecordingSettings/Default"
_10
}

HTTP POST: Set Settings

http-post page anchor

Sets your account's default Recording Settings. POST requests support the following parameters:

Request body parameters
FriendlyNametype: stringNot PII
Required

A descriptive string that you create to describe the resource and be shown to users in the console


AwsCredentialsSidtype: SID<CR>Not PII

The SID of the stored Credential resource.


EncryptionKeySidtype: SID<CR>Not PII

The SID of the Public Key resource to use for encryption.


AwsS3Urltype: string<URI>Not PII

The URL of the AWS S3 bucket where the recordings should be stored. We only support DNS-compliant URLs like https://documentation-example-twilio-bucket/recordings, where recordings is the path in which you want the recordings to be stored. This URL accepts only URI-valid characters, as described in the RFC 3986(link takes you to an external page).


AwsStorageEnabledtype: booleanNot PII

Whether all recordings should be written to the aws_s3_url. When false, all recordings are stored in our cloud.


EncryptionEnabledtype: booleanNot PII

Whether all recordings should be stored in an encrypted form. The default is false.

In the table above, the following parameters are reserved for the feature called Encrypted Recordings:

  • EncryptionKeySid
  • EncryptionEnabled

If you have an interest in activating Encrypted Recordings and enable the use of these parameters in your account, please contact the Twilio Support Service.(link takes you to an external page)

Enabling external S3 storage for Recordings

enable-s3 page anchor

The following code snippet illustrates how you can set your Recordings to be stored in an external S3 bucket:

Create or update the configuration to upload to an external S3 bucket

create-or-update-the-configuration-to-upload-to-an-external-s3-bucket page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_15
// Download the helper library from https://www.twilio.com/docs/node/install
_15
// Find your Account SID and Auth Token at twilio.com/console
_15
// and set the environment variables. See http://twil.io/secure
_15
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_15
const authToken = process.env.TWILIO_AUTH_TOKEN;
_15
const client = require('twilio')(accountSid, authToken);
_15
_15
client.video.v1.recordingSettings()
_15
.create({
_15
awsS3Url: 'https://my-bucket.s3.amazonaws.com/recordings',
_15
awsStorageEnabled: true,
_15
awsCredentialsSid: 'CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_15
friendlyName: 'Upload to external bucket'
_15
})
_15
.then(recording_settings => console.log(recording_settings.friendlyName));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "Upload to external bucket",
_10
"aws_credentials_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"encryption_key_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"aws_s3_url": "https://my-bucket.s3.amazonaws.com/recordings",
_10
"aws_storage_enabled": true,
_10
"encryption_enabled": true,
_10
"url": "https://video.twilio.com/v1/RecordingSettings/Default"
_10
}

Disabling external S3 storage for Recordings

disabling-external-s3-storage-for-recordings page anchor

To stop storing recordings in an AWS S3 Bucket by default, you can create a new default configuration with AWS storage disabled. If you disable external AWS S3 storage, recordings will be stored in the Twilio cloud.

Disable external S3 storage for Recordings

disable-external-s3-storage-for-recordings page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_13
// Download the helper library from https://www.twilio.com/docs/node/install
_13
// Find your Account SID and Auth Token at twilio.com/console
_13
// and set the environment variables. See http://twil.io/secure
_13
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13
const authToken = process.env.TWILIO_AUTH_TOKEN;
_13
const client = require('twilio')(accountSid, authToken);
_13
_13
client.video.v1.recordingSettings()
_13
.create({
_13
awsStorageEnabled: ,
_13
friendlyName: 'Resetting default configuration'
_13
})
_13
.then(recording_settings => console.log(recording_settings.friendlyName));

Output

_10
{
_10
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"friendly_name": "Resetting default configuration",
_10
"aws_credentials_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"encryption_key_sid": "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
_10
"aws_storage_enabled": ,
_10
"encryption_enabled": true,
_10
"url": "https://video.twilio.com/v1/RecordingSettings/Default"
_10
}


  • If you activate External S3 Storage in your account, you will not be able to use Compositions in such account given that Compositions require the source recordings to be stored in Twilio's cloud.

Rate this page: