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.
We recommend migrating your application to the API provided by our preferred video partner, Zoom. We've prepared this migration guide to assist you in minimizing any service disruption.
The Programmable Video Rooms resource represents a communications session among multiple endpoints using one of Twilio's Programmable Video SDKs. Connected users (Participants) can share video and audio Tracks with the Room, and receive video and audio Tracks from other Participants in the Room.
The Rooms resource lets you dynamically create and complete Rooms, and configure a Room's topology and behavior. Use this API to set Room properties such as its name, type, TURN configuration, webhook status callback URL, and the maximum number of Participants.
All Programmable Video REST API resources use the following base URL.
1https://video.twilio.com2
1/v1/Rooms/{RoomNameOrSid}2
The unique string that we created to identify the Room resource.
^RM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The status of the room. Can be: in-progress
, failed
, or completed
.
in-progress
completed
failed
The date and time in GMT when the resource was created specified in ISO 8601 format.
The date and time in GMT when the resource was last updated specified in ISO 8601 format.
The SID of the Account that created the Room resource.
^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
An application-defined string that uniquely identifies the resource. It can be used as a room_sid
in place of the resource's sid
in the URL to address the resource, assuming it does not contain any reserved characters that would need to be URL encoded. This value is unique for in-progress
rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is in-progress
.
The URL we call using the status_callback_method
to send status information to your application on every room event. See Status Callbacks for more info.
The HTTP method we use to call status_callback
. Can be POST
or GET
and defaults to POST
.
GET
POST
The type of room. Can be: go
, peer-to-peer
, group-small
, or group
. The default value is group
.
go
peer-to-peer
group
group-small
The maximum number of concurrent Participants allowed in the room.
0
The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).
0
The maximum number of published audio, video, and data tracks all participants combined are allowed to publish in the room at the same time. Check Programmable Video Limits for more details. If it is set to 0 it means unconstrained.
Whether to start recording when Participants connect. This feature is not available in peer-to-peer
rooms.
An array of the video codecs that are supported when publishing a track in the room. Can be: VP8
and H264
. This feature is not available in peer-to-peer
rooms
VP8
H264
The region for the media server in Group Rooms. Can be: one of the available Media Regions. This feature is not available in peer-to-peer
rooms.
When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. Group rooms only.
Specifies how long (in minutes) a room will remain active after last participant leaves. Can be configured when creating a room via REST API. For Ad-Hoc rooms this value cannot be changed.
0
Specifies how long (in minutes) a room will remain active if no one joins. Can be configured when creating a room via REST API. For Ad-Hoc rooms this value cannot be changed.
0
The URLs of related resources.
Returns a single Room resource represented by {RoomNameOrSid}
.
You can retrieve an in-progress
Room instance object using the Room's UniqueName
, assuming the UniqueName
does not contain any reserved characters that would need to be URL encoded. This makes it easier to interact with Twilio's REST API without having to keep track of Twilio's Room SID identifiers.
For example:
GET /Rooms/DailyStandup
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchRoom() {11const room = await client.video.v1.rooms("DailyStandup").fetch();1213console.log(room.sid);14}1516fetchRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "DailyStandup",8"enable_turn": true,9"unique_name": "unique_name",10"max_participants": 10,11"max_participant_duration": 86400,12"max_concurrent_published_tracks": 0,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"audio_only": false,21"media_region": "us1",22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
Will return the Room instance object for the Room DailyStandup
if the room is currently in-progress
. If no Room exists by the name DailyStandup
, or a Room by that name is only in completed
status, the above request will return an HTTP 404 response.
A Room's Sid
property is Twilio's own canonical unique identifier for a Room. You can always use the Room Sid
to retrieve the Room, whether the room is in-progress
or completed
.
For example:
GET /Rooms/RMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchRoom() {11const room = await client.video.v112.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.fetch();1415console.log(room.sid);16}1718fetchRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",8"enable_turn": true,9"unique_name": "unique_name",10"max_participants": 10,11"max_participant_duration": 86400,12"max_concurrent_published_tracks": 0,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"audio_only": false,21"media_region": "us1",22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
Will return the Room instance object for the Room with Sid
RMxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
, regardless of its status. If no Room exists with that Sid, the above request will return an HTTP 404 response.
Modifies a Room resource.
Supported POST
parameters
The SID of the Room resource to update.
application/x-www-form-urlencoded
The new status of the resource. Set to completed
to end the room.
in-progress
completed
failed
Update a Room's status to completed
with the following request to end the Room. All connected
Participants will be immediately disconnected from the Room.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function updateRoom() {11const room = await client.video.v112.rooms("RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")13.update({ status: "completed" });1415console.log(room.sid);16}1718updateRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "completed",6"type": "peer-to-peer",7"sid": "RMXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",8"enable_turn": true,9"unique_name": "unique_name",10"max_participants": 10,11"max_participant_duration": 86400,12"max_concurrent_published_tracks": 10,13"status_callback_method": "POST",14"status_callback": null,15"record_participants_on_connect": false,16"video_codecs": [17"VP8"18],19"media_region": "us1",20"audio_only": false,21"empty_room_timeout": 5,22"unused_room_timeout": 5,23"end_time": "2015-07-30T20:00:00Z",24"large_room": false,25"duration": 10,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
1/v1/Rooms2
Create a new Room with an HTTP POST
to the Rooms list resource.
application/x-www-form-urlencoded
The type of room. Can be: go
, peer-to-peer
, group-small
, or group
. The default value is group
.
go
peer-to-peer
group
group-small
An application-defined string that uniquely identifies the resource. It can be used as a room_sid
in place of the resource's sid
in the URL to address the resource, assuming it does not contain any reserved characters that would need to be URL encoded. This value is unique for in-progress
rooms. SDK clients can use this name to connect to the room. REST API clients can use this name in place of the Room SID to interact with the room as long as the room is in-progress
.
The URL we should call using the status_callback_method
to send status information to your application on every room event. See Status Callbacks for more info.
The HTTP method we should use to call status_callback
. Can be POST
or GET
.
GET
POST
The maximum number of concurrent Participants allowed in the room. Peer-to-peer rooms can have up to 10 Participants. Small Group rooms can have up to 4 Participants. Group rooms can have up to 50 Participants.
Whether to start recording when Participants connect. This feature is not available in peer-to-peer
rooms.
An array of the video codecs that are supported when publishing a track in the room. Can be: VP8
and H264
. This feature is not available in peer-to-peer
rooms
VP8
H264
The region for the media server in Group Rooms. Can be: one of the available Media Regions. This feature is not available in peer-to-peer
rooms.
A collection of Recording Rules that describe how to include or exclude matching tracks for recording
When set to true, indicates that the participants in the room will only publish audio. No video tracks will be allowed. Group rooms only.
The maximum number of seconds a Participant can be connected to the room. The maximum possible value is 86400 seconds (24 hours). The default is 14400 seconds (4 hours).
Configures how long (in minutes) a room will remain active after last participant leaves. Valid values range from 1 to 60 minutes (no fractions).
Configures how long (in minutes) a room will remain active if no one joins. Valid values range from 1 to 60 minutes (no fractions).
When set to true, indicated that this is the large room.
Note: Rooms created via the REST API exist for five minutes to allow the first Participant to connect. If no Participants join within five minutes, the Room times out and a new Room must be created.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12uniqueName: "DailyStandup",13});1415console.log(room.sid);16}1718createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "DailyStandup",10"max_concurrent_published_tracks": 0,11"max_participants": 10,12"max_participant_duration": 86400,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": false,22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12statusCallback: "http://example.org",13type: "peer-to-peer",14uniqueName: "SalesMeeting",15});1617console.log(room.sid);18}1920createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "SalesMeeting",10"max_concurrent_published_tracks": 0,11"max_participants": 10,12"max_participant_duration": 86400,13"duration": 0,14"status_callback_method": "POST",15"status_callback": "http://example.org",16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": false,22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12recordParticipantsOnConnect: true,13statusCallback: "http://example.org",14type: "group",15uniqueName: "DailyStandup",16});1718console.log(room.sid);19}2021createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "group",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "DailyStandup",10"max_participants": 50,11"max_participant_duration": 86400,12"max_concurrent_published_tracks": 170,13"duration": 0,14"status_callback_method": "POST",15"status_callback": "http://example.org",16"record_participants_on_connect": true,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": false,22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12audioOnly: true,13type: "group",14uniqueName: "Audio-Only Call",15});1617console.log(room.sid);18}1920createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "group",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "Audio-Only Call",10"max_concurrent_published_tracks": 0,11"max_participants": 10,12"max_participant_duration": 86400,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": true,22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
By default, a Room will end five minutes after the last participant disconnects from the Room. You can configure this to be a different value up to 60 minutes when you create the Room via the REST API. The value is specified in minutes.
The example below demonstrates configuring the Room's empty room timeout value. Note that you can also configure with the Room's unused room timeout value in the same way. The unused room timeout determines how long to wait before ending the Room if no participants join.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12emptyRoomTimeout: 60,13uniqueName: "DailyStandup",14});1516console.log(room.sid);17}1819createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "DailyStandup",10"max_concurrent_published_tracks": 0,11"max_participants": 10,12"max_participant_duration": 86400,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": false,22"empty_room_timeout": 60,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}
Once a Room is created, generate an Access Token containing the Room name and use one of Twilio's Video SDKs to connect to the Room.
For example, using the JavaScript SDK:
1Twilio.Video.connect('$AccessTokenContainingRoomName').then(function(room) {2console.log('Successfully joined a Room: ', room);3}, function(error) {4console.error('Unable to connect to Room: ' + error.message);5});
Returns a list of Room resources created in the given account. The list includes paging information.
The following GET
query string parameters allow you to limit the list returned. Note, parameters are case-sensitive.
Read only the rooms with this status. Can be: in-progress
(default) or completed
in-progress
completed
failed
Read only rooms that started on or after this date, given as YYYY-MM-DD
.
Read only rooms that started before this date, given as YYYY-MM-DD
.
How many resources to return in each list page. The default is 50, and the maximum is 1000.
1
Maximum: 1000
The page token. This is provided by the API.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listRoom() {11const rooms = await client.video.v1.rooms.list({12status: "completed",13uniqueName: "DailyStandup",14limit: 20,15});1617rooms.forEach((r) => console.log(r.sid));18}1920listRoom();
1{2"rooms": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",9"next_page_url": null,10"key": "rooms"11}12}
Returns a list containing any completed
Rooms with the name DailyStandup
. Note that the status
parameter defaults to in-progress
. If no status
is provided, this endpoint will return a list containing only in-progress
rooms with the name DailyStandup
.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listRoom() {11const rooms = await client.video.v1.rooms.list({12status: "completed",13limit: 20,14});1516rooms.forEach((r) => console.log(r.sid));17}1819listRoom();
1{2"rooms": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",9"next_page_url": null,10"key": "rooms"11}12}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function listRoom() {11const rooms = await client.video.v1.rooms.list({12status: "completed",13uniqueName: "DailyStandup",14limit: 20,15});1617rooms.forEach((r) => console.log(r.sid));18}1920listRoom();
1{2"rooms": [],3"meta": {4"page": 0,5"page_size": 50,6"first_page_url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",7"previous_page_url": null,8"url": "https://video.twilio.com/v1/Rooms?PageSize=50&Page=0",9"next_page_url": null,10"key": "rooms"11}12}
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRoom() {11const room = await client.video.v1.rooms.create({12maxParticipantDuration: 86400,13uniqueName: "DailyStandup",14});1516console.log(room.sid);17}1819createRoom();
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"date_created": "2015-07-30T20:00:00Z",4"date_updated": "2015-07-30T20:00:00Z",5"status": "in-progress",6"type": "peer-to-peer",7"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"enable_turn": true,9"unique_name": "DailyStandup",10"max_concurrent_published_tracks": 0,11"max_participants": 10,12"max_participant_duration": 86400,13"duration": 0,14"status_callback_method": "POST",15"status_callback": null,16"record_participants_on_connect": false,17"video_codecs": [18"VP8"19],20"media_region": "us1",21"audio_only": false,22"empty_room_timeout": 5,23"unused_room_timeout": 5,24"end_time": "2015-07-30T20:00:00Z",25"large_room": false,26"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",27"links": {28"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",29"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",30"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"31}32}