Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

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

Names in PHP format
sid
sid<PA> Not PII

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

roomSid
sid<RM> Not PII

The SID of the participant's room.

accountSid
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 for more info.

dateCreated
date_time<iso8601> Not PII

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

dateUpdated
date_time<iso8601> Not PII

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

startTime
date_time<iso8601> Not PII

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

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

        
        
        
        

        HTTP POST

        Modifies a Participant resource.

        Names in PHP format
        roomSid
        Required
        post sid_like<RM> Not PII

        The SID of the room with the participant to update.

        sid
        Required
        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.

              
              
              
              

              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.

              Names in PHP format
              roomSid
              Required
              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.

              dateCreatedAfter
              Optional
              get date_time<iso8601> Not PII

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

              dateCreatedBefore
              Optional
              get date_time<iso8601> Not PII

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

                    
                    
                    
                    
                          
                          
                          
                          
                          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 browsing the Twilio tag on Stack Overflow.