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

Configure the Maximum Participant Duration for a Room


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

Twilio Video Rooms allow you to configure the maximum amount of time that a Participant can be connected to the Room. The default maximum Participant duration for Video Rooms is four hours and the maximum amount of time a Participant can be connected to a Room is 24 hours. Once a Participant has been connected to a Room for the Room's maximum Participant duration, they will be disconnected from the Room.

If you wish to configure the maximum Participant duration for you Video Rooms, you can do so in two ways: via the Twilio REST API, or via the Twilio Console.


REST API

rest-api page anchor

You can configure the maximum Participant duration for Video Rooms on a per-Room basis during Room creation using the REST API. When creating the Room, you can specify the maximum Participant duration in seconds.

Configure a Room's maximum Participant duration

configure-a-rooms-maximum-participant-duration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_19
// Download the helper library from https://www.twilio.com/docs/node/install
_19
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19
_19
// Find your Account SID and Auth Token at twilio.com/console
_19
// and set the environment variables. See http://twil.io/secure
_19
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19
const authToken = process.env.TWILIO_AUTH_TOKEN;
_19
const client = twilio(accountSid, authToken);
_19
_19
async function createRoom() {
_19
const room = await client.video.v1.rooms.create({
_19
maxParticipantDuration: 86400,
_19
uniqueName: "My Video Room",
_19
});
_19
_19
console.log(room.sid);
_19
}
_19
_19
createRoom();

Output

_32
{
_32
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"date_created": "2015-07-30T20:00:00Z",
_32
"date_updated": "2015-07-30T20:00:00Z",
_32
"status": "in-progress",
_32
"type": "peer-to-peer",
_32
"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"enable_turn": true,
_32
"unique_name": "My Video Room",
_32
"max_concurrent_published_tracks": 0,
_32
"max_participants": 10,
_32
"max_participant_duration": 86400,
_32
"duration": 0,
_32
"status_callback_method": "POST",
_32
"status_callback": null,
_32
"record_participants_on_connect": false,
_32
"video_codecs": [
_32
"VP8"
_32
],
_32
"media_region": "us1",
_32
"audio_only": false,
_32
"empty_room_timeout": 5,
_32
"unused_room_timeout": 5,
_32
"end_time": "2015-07-30T20:00:00Z",
_32
"large_room": false,
_32
"url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_32
"links": {
_32
"participants": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants",
_32
"recordings": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings",
_32
"recording_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/RecordingRules"
_32
}
_32
}


In the Twilio Console, you can update the default maximum Participant duration for all of the Video Rooms created in your account. After you update this value in the Console, any new Rooms that you create without explicitly setting the maximum Participant duration will take this configured value.

To update this value, navigate to Room Settings(link takes you to an external page) section in the Console, where you will be able to update the value. Note that the duration should be specified in seconds.

By default, PSTN Participants are limited to a four-hour maximum duration. You can enable the 24-hour maximum duration in your Programmable Voice Settings console.(link takes you to an external page)


Rate this page: