Participant
A Participant is a single individual communicating in a Session. There is a limit of two Participants per Session.
You can create a Proxy Participant in two ways:
- By specifying the private Phone Number of the Participant (Identifier) and relying on Proxy to select an appropriate Phone Number from the Proxy Number pool. The Proxy Number returned (Proxy Identifier) is the Phone Number that the Participant should call to reach the other party.
- By specifying both the Identifier and the Proxy Identifier. In this case, Proxy will attempt to use the Twilio Phone Number provided. Note: The Twilio Phone Number specified must already be added to the Proxy Number pool in order to be accepted.
Participant properties
Resource Properties in REST API format | |
---|---|
sid
|
The unique string that we created to identify the Participant resource. |
session_sid
|
The SID of the parent Session resource. |
service_sid
|
The SID of the resource's parent Service resource. |
account_sid
|
The SID of the Account that created the Participant resource. |
friendly_name
|
The string that you assigned to describe the participant. This value must be 255 characters or fewer. Supports UTF-8 characters. This value should not have PII. |
identifier
|
The phone number or channel identifier of the Participant. This value must be 191 characters or fewer. Supports UTF-8 characters. |
proxy_identifier
|
The phone number or short code (masked number) of the participant's partner. The participant will call or message the partner participant at this number. |
proxy_identifier_sid
|
The SID of the Proxy Identifier assigned to the Participant. |
date_deleted
|
The ISO 8601 date when the Participant was removed from the session. |
date_created
|
The ISO 8601 date and time in GMT when the resource was created. |
date_updated
|
The ISO 8601 date and time in GMT when the resource was last updated. |
url
|
The absolute URL of the Participant resource. |
links
|
The URLs to resources related the participant. |
Create a Participant resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service resource. |
session_sid
Path
|
The SID of the parent Session resource. |
identifier
Required
|
The phone number of the Participant. |
friendly_name
Optional
|
The string that you assigned to describe the participant. This value must be 255 characters or fewer. This value should not have PII. |
proxy_identifier
Optional
|
The proxy phone number to use for the Participant. If not specified, Proxy will select a number from the pool. |
proxy_identifier_sid
Optional
|
The SID of the Proxy Identifier to assign to the Participant. |
Example 1
Fetch a Participant resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service of the resource to fetch. |
session_sid
Path
|
The SID of the parent Session of the resource to fetch. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Participant resource to fetch. |
Example 1
Read multiple Participant resources
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service of the resources to read. |
session_sid
Path
|
The SID of the parent Session of the resources to read. |
Update a Participant
In order to add a new Participant in a Session, you can DELETE an existing Participant and then add a new one.
Adding a participant that was removed is not possible.
Proxy will return with error 80103 if the new participant's identifier matches the DELETEd participant's identifier.
Example 1
Delete a Participant resource
https://proxy.twilio.com/v1/Services/{ServiceSid}/Sessions/{SessionSid}/Participants/{Sid}
Parameters
Parameters in REST API format | |
---|---|
service_sid
Path
|
The SID of the parent Service of the resource to delete. |
session_sid
Path
|
The SID of the parent Session of the resource to delete. |
sid
Path
|
The Twilio-provided string that uniquely identifies the Participant resource to delete. |
Example 1
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.