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

Encrypted Recordings


(warning)

Warning

This documentation 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, 2026(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.

(information)

Overview

overview page anchor

The Twilio Recording Settings REST API lets you configure Twilio to store your recordings encrypted. Recording Settings work per-account (i.e. project). If you activate encryption, all Video Recordings in your account (or project) will get encrypted.

This document contains reference information about the Recording Settings REST API for encryption. For a step-by-step guide you can also read the Encrypting your Stored Media 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:

Property nameTypePIIDescription
account_sidSID<AC>
Not PII

The SID of the Account that created the RecordingSettings resource.

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

friendly_namestring

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


aws_credentials_sidSID<CR>

The SID of the stored Credential resource.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34

aws_s3_urlstring<uri>

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_enabledboolean

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


encryption_key_sidSID<CR>

The SID of the Public Key resource used for encryption.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34

encryption_enabledboolean

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


urlstring<uri>

The absolute URL of the resource.

In the table above, the following properties are reserved for the feature called External S3 Storage:

  • aws_credentials_sid
  • aws_s3_url
  • aws_storage_enabled

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

_12
// Download the helper library from https://www.twilio.com/docs/node/install
_12
import twilio from "twilio";
_12
_12
// Find your Account SID and Auth Token at twilio.com/console
_12
// and set the environment variables. See http://twil.io/secure
_12
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_12
const authToken = process.env.TWILIO_AUTH_TOKEN;
_12
const client = twilio(accountSid, authToken);
_12
_12
const recordingSetting = await client.video.recordingSettings().fetch();
_12
_12
console.log(recordingSetting.accountSid);

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"friendly_name": "string",
_10
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"encryption_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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:

Property nameTypeRequiredPIIDescription
FriendlyNamestringrequired

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


AwsCredentialsSidSID<CR>Optional

The SID of the stored Credential resource.

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34

EncryptionKeySidSID<CR>Optional

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

Pattern: ^CR[0-9a-fA-F]{32}$Min length: 34Max length: 34

AwsS3Urlstring<uri>Optional

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).


AwsStorageEnabledbooleanOptional

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


EncryptionEnabledbooleanOptional

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 External S3 Storage:

  • AwsCredentialsSid
  • AwsS3Url
  • AwsStorageEnabled

Enabling Encrypted Recordings

enable-encryption page anchor

The following code snippets illustrate how you can set Encryption in your Recordings settings:

Creates or updates the configuration to upload encrypted files

creates-or-updates-the-configuration-to-upload-encrypted-files page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
import twilio from "twilio";
_16
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = twilio(accountSid, authToken);
_16
_16
const recordingSetting = await client.video.recordingSettings().create({
_16
encryptionEnabled: true,
_16
encryptionKeySid: "CRXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
friendlyName: "Upload encrypted",
_16
});
_16
_16
console.log(recordingSetting.accountSid);

Output

_10
{
_10
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_10
"friendly_name": "Upload encrypted",
_10
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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
}


Known Problems and Limitations

known-problems-and-limitations page anchor
  • If you activate Encryption in your account, you will not be able to use Compositions in such account given that Compositions require the source recordings to be stored unencrypted.

Rate this page: