Menu

Expand
Rate this page:

WebChats Resource

Flex Webchats is an endpoint that simplifies orchestrating a Conversation for a guest user: It creates a conversation, adds a randomly generated user identity to this conversation, and configures the Conversation based on the Address SID you provide. To get started with this endpoint, please refer to the web chat React-based demo app.

WebChannel properties

Resource Properties in REST API format
conversation_sid
sid<CH> Not PII

The unique string representing the Conversation resource created.

identity
string Not PII

The unique string representing the User created and should be authorized to participate in the Conversation. For more details, see User Identity & Access Tokens.

Create a WebChannel resource

post
https://flex-api.twilio.com/v2/WebChats
Parameters
Parameters in REST API format
address_sid
Required
post string Not PII

The SID of the Conversations Address. See Address Configuration Resource for configuration details. When a conversation is created on the Flex backend, the callback URL will be set to the corresponding Studio Flow SID or webhook URL in your address configuration.

chat_friendly_name
Optional
post string PII MTL: 30 DAYS

The Conversation's friendly name. See the Conversation resource for an example.

customer_friendly_name
Optional
post string PII MTL: 30 DAYS

The Conversation participant's friendly name. See the Conversation Participant Resource for an example.

pre_engagement_data
Optional
post string PII MTL: 30 DAYS

The pre-engagement data.

Example 1
Loading Code Sample...
        
        

        Create a Web Channel

        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