Twilio Conversations client library

Twilio Conversations: Create meaningful connections with customers across various communication channels. Visit our official site for more detalis:

Supported Browsers

BrowserSupported Versions
Chrome for Android89
Firefox for Android86
UC Browser for Android12.12
Chrome89, 88, 87
Edge89, 88, 87
Firefox87, 86, 85
Internet Explorer11
Safari for iOS14.0-14.5, 13.4-13.7
Safari14, 13.1, 13
Samsung Internet13.0, 12.0

Instantiating and using

To use the library you need to generate a token and pass it to the conversations Client create factory.


npm install --save @twilio/conversations

Using this method, you can require twilio-conversations and then use the client:

const Conversations = require('twilio-conversations');
Conversations.Client.create(token).then(client => {
    // Use client

or, if you prefer async/await syntax:

const Conversations = require('twilio-conversations');
let client = await Conversations.Client.create(token);
// Use client


Releases of twilio-conversations.js are hosted on a CDN, and you can include these directly in your web app using a <script> tag.

<script src=""></script>

Using this method, twilio-conversations.js will set a browser global Twilio.Conversations through which you can use the client :

Twilio.Conversations.Client.create(token).then(client => {
    // Use client

or, if you prefer async/await syntax:

let client = await Twilio.Conversations.Client.create(token);
// Use client


The CDN consumption described above allows you to consume latest bug fixed versions automatically, but does not prevent from detecting malicious modifications in the SDK code.

If you require more security you will have to consume SDK by using SRI and using an exact version number. While less flexible it is significantly more secure, which is required by some applications.

To consume securely use the following script snippet format:

<script src=""
        integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"

Find the hash of each release published on the Changelog page.


See this link.