Participants
The Participants resource is a subresource of a Rooms instance resource. It represents participants currently connected to a given Room. A Participant instance resource represents an individual Room participant.
The Participant Instance resource lets you kick Participants out of a Room they are connected to. You can query the Participants List resource to get a list of participants currently connected
to the Room. You can also get a list of Participants that are disconnected
from the Room.
This resource represents a single Room participant, identified by the ParticipantSid or a ParticipantIdentity.
_10/v1/Rooms/{RoomNameOrSid}/Participants/{ParticipantIdentityOrSid}/
Property nameTypePIIDescription
The unique string that we created to identify the RoomParticipant resource.
Pattern: ^PA[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the participant's room.
Pattern: ^RM[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The SID of the Account that created the RoomParticipant resource.
Pattern: ^AC[0-9a-fA-F]{32}$
Min length: 34
Max length: 34
The status of the Participant. Can be: connected
or disconnected
.
Possible values: connected
disconnected
The application-defined string that uniquely identifies the resource's User within a Room. If a client joins with an existing Identity, the existing client is disconnected. See access tokens and limits for more info.
date_createdstring<date-time>
date_updatedstring<date-time>
start_timestring<date-time>
end_timestring<date-time>
The duration in seconds that the participant was connected
. Populated only after the participant is disconnected
.
The absolute URL of the resource.
The URLs of related resources.
Returns a single Participant resource represented by {ParticipantNameOrSid}
GET /Participants/{ParticipantIdentity}
implicitly searches only connected
Participants for the given ParticipantIdentity
and returns either an instance or a 404.
Will return the Participant instance object for the Participant Alice
whose Status is connected
, from the in-progress
Room named DailyStandup
.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function fetchRoomParticipant() {
_19 const participant = await client.video.v1
_19 .rooms("DailyStandup")
_19 .participants("Alice")
_19 console.log(participant.sid);
_19fetchRoomParticipant();
_19 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19 "room_sid": "DailyStandup",
_19 "date_created": "2015-07-30T20:00:00Z",
_19 "date_updated": "2015-07-30T20:00:00Z",
_19 "start_time": "2015-07-30T20:00:00Z",
_19 "status": "connected",
_19 "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19 "published_tracks": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PublishedTracks",
_19 "subscribed_tracks": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedTracks",
_19 "subscribe_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribeRules",
_19 "anonymize": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Anonymize"
Modifies a Participant resource.
Property nameTypeRequiredPIIDescription
The SID of the room with the participant to update.
The SID of the RoomParticipant resource to update.
Property nameTypeRequiredPIIDescription
Statusenum<string>Optional The new status of the resource. Can be: connected
or disconnected
. For in-progress
Rooms the default Status is connected
, for completed
Rooms only disconnected
Participants are returned.
Possible values: connected
disconnected
Update a Participant's status to disconnected
to remove the Participant from a Room.
_19// Download the helper library from https://www.twilio.com/docs/node/install
_19const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_19// Find your Account SID and Auth Token at twilio.com/console
_19// and set the environment variables. See http://twil.io/secure
_19const accountSid = process.env.TWILIO_ACCOUNT_SID;
_19const authToken = process.env.TWILIO_AUTH_TOKEN;
_19const client = twilio(accountSid, authToken);
_19async function updateRoomParticipant() {
_19 const participant = await client.video.v1
_19 .rooms("DailyStandup")
_19 .participants("Alice")
_19 .update({ status: "disconnected" });
_19 console.log(participant.sid);
_19updateRoomParticipant();
_19 "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19 "room_sid": "DailyStandup",
_19 "date_created": "2017-07-30T20:00:00Z",
_19 "date_updated": "2017-07-30T20:00:00Z",
_19 "start_time": "2017-07-30T20:00:00Z",
_19 "end_time": "2017-07-30T20:00:01Z",
_19 "status": "disconnected",
_19 "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_19 "published_tracks": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PublishedTracks",
_19 "subscribed_tracks": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribedTracks",
_19 "subscribe_rules": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SubscribeRules",
_19 "anonymize": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Anonymize"
_10/v1/Rooms/{RoomNameOrSid}/Participants/
Returns a list of Participant resources associated with this Room. The list includes paging information. You can filter the results by providing query string parameters.
The following GET
query string parameters allow you to limit the list returned. Note, parameters are case-sensitive.
Property nameTypeRequiredPIIDescription
The SID of the room with the Participant resources to read.
Property nameTypeRequiredPIIDescription
Statusenum<string>Optional Read only the participants with this status. Can be: connected
or disconnected
. For in-progress
Rooms the default Status is connected
, for completed
Rooms only disconnected
Participants are returned.
Possible values: connected
disconnected
Read only the Participants with this User identity
value.
DateCreatedAfterstring<date-time>Optional
DateCreatedBeforestring<date-time>Optional
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum: 1
Maximum: 1000
The page index. This value is simply for client state.
Minimum: 0
The page token. This is provided by the API.
_21// Download the helper library from https://www.twilio.com/docs/node/install
_21const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21// Find your Account SID and Auth Token at twilio.com/console
_21// and set the environment variables. See http://twil.io/secure
_21const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21const authToken = process.env.TWILIO_AUTH_TOKEN;
_21const client = twilio(accountSid, authToken);
_21async function listRoomParticipant() {
_21 const participants = await client.video.v1
_21 .rooms("DailyStandup")
_21 participants.forEach((p) => console.log(p.sid));
_21listRoomParticipant();
_12 "first_page_url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_12 "previous_page_url": null,
_12 "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_12 "next_page_url": null,
_12 "key": "participants"
_21// Download the helper library from https://www.twilio.com/docs/node/install
_21const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_21// Find your Account SID and Auth Token at twilio.com/console
_21// and set the environment variables. See http://twil.io/secure
_21const accountSid = process.env.TWILIO_ACCOUNT_SID;
_21const authToken = process.env.TWILIO_AUTH_TOKEN;
_21const client = twilio(accountSid, authToken);
_21async function listRoomParticipant() {
_21 const participants = await client.video.v1
_21 .rooms("DailyStandup")
_21 status: "disconnected",
_21 participants.forEach((p) => console.log(p.sid));
_21listRoomParticipant();
_12 "first_page_url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_12 "previous_page_url": null,
_12 "url": "https://video.twilio.com/v1/Rooms/RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants?PageSize=50&Page=0",
_12 "next_page_url": null,
_12 "key": "participants"