Menu

Expand
Rate this page:

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.

Participant Instance Resource

This resource represents a single Room participant, identified by the ParticipantSid or a ParticipantIdentity.

Resource URI

/v1/Rooms/{RoomNameOrSid}/Participants/{ParticipantIdentityOrSid}/

Resource Properties

Resource Properties in REST API format
sid
sid<PA> Not PII

The unique string that we created to identify the RoomParticipant resource.

room_sid
sid<RM> Not PII

The SID of the participant's room.

account_sid
sid<AC> Not PII

The SID of the Account that created the RoomParticipant resource.

status
enum:status Not PII

The status of the Participant. Can be: connected or disconnected.

identity
string Not PII

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_created
date_time<iso8601> Not PII

The date and time in GMT when the resource was created specified in ISO 8601 format.

date_updated
date_time<iso8601> Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601 format.

start_time
date_time<iso8601> Not PII

The time of participant connected to the room in ISO 8601 format.

end_time
date_time<iso8601> Not PII

The time when the participant disconnected from the room in ISO 8601 format.

duration
integer? Not PII

The duration in seconds that the participant was connected. Populated only after the participant is disconnected.

url
url Not PII

The absolute URL of the resource.

links
uri_map Not PII

The URLs of related resources.

HTTP GET

Returns a single Participant resource represented by {ParticipantNameOrSid}

Naming behavior

GET /Participants/{ParticipantIdentity} implicitly searches only connected Participants for the given ParticipantIdentity and returns either an instance or a 404.

Retrieve a connected Participant from a Room by Identity

Will return the Participant instance object for the Participant Alice whose Status is connected, from the in-progress Room named DailyStandup.

Loading Code Sample...
        
        

        Retrieve a Participant

        HTTP POST

        Modifies a Participant resource.

        Parameters in REST API format
        room_sid
        Path
        post sid_like<RM> Not PII

        The SID of the room with the participant to update.

        sid
        Path
        post sid_like<PA> Not PII

        The SID of the RoomParticipant resource to update.

        status
        Optional
        post enum:status Not PII

        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.

        Kick/Remove Participant from a Room

        Update a Participant’s status to disconnected to remove the Participant from a Room.

        Loading Code Sample...
              
              

              Remove a Participant

              Participant List Resource

              Resource URI

              /v1/Rooms/{RoomNameOrSid}/Participants/
              

              HTTP GET

              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.

              List Filters

              The following GET query string parameters allow you to limit the list returned. Note, parameters are case-sensitive.

              Parameters in REST API format
              room_sid
              Path
              get sid_like<RM> Not PII

              The SID of the room with the Participant resources to read.

              status
              Optional
              get enum:status Not PII

              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.

              identity
              Optional
              get string Not PII

              Read only the Participants with this User identity value.

              date_created_after
              Optional
              get date_time<iso8601> Not PII

              Read only Participants that started after this date in ISO 8601 format.

              date_created_before
              Optional
              get date_time<iso8601> Not PII

              Read only Participants that started before this date in ISO 8601 format.

              Loading Code Sample...
                    
                    

                    Retrieve a list of connected Participants

                    Loading Code Sample...
                          
                          

                          Retrieve a list of disconnected Participants

                          Rate this page:

                          Need some help?

                          We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.

                          Loading Code Sample...
                                
                                
                                

                                Thank you for your feedback!

                                Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

                                Sending your feedback...
                                🎉 Thank you for your feedback!
                                Something went wrong. Please try again.

                                Thanks for your feedback!

                                thanks-feedback-gif