# @twilio/conversations

> Twilio Conversations client library

Latest version **3.0.1** (published 2026-09-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @twilio/conversations
pnpm add @twilio/conversations
yarn add @twilio/conversations
bun add @twilio/conversations
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no esm support; large bundle.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-09-01 |
| First published | 2020-06-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 15 |
| Unpacked size | 11.9 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Twilio |
| Maintainers | twilio-supply-chain |

## Links

- npm: https://www.npmjs.com/package/@twilio/conversations
- npm.io page: https://npm.io/package/@twilio/conversations

## Dependencies (15)

- [core-js](https://npm.io/package/core-js.md) ^3.17.3
- [loglevel](https://npm.io/package/loglevel.md) ^1.8.0
- [platform](https://npm.io/package/platform.md) ^1.3.6
- [twilsock](https://npm.io/package/twilsock.md) ^1.0.2
- [quick-lru](https://npm.io/package/quick-lru.md) ^5.1.1
- [twilio-sync](https://npm.io/package/twilio-sync.md) ^4.0.1
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.17.0
- [xmlhttprequest](https://npm.io/package/xmlhttprequest.md) ^1.8.0
- [iso8601-duration](https://npm.io/package/iso8601-duration.md) =1.2.0
- [@twilio/mcs-client](https://npm.io/package/@twilio/mcs-client.md) ^1.0.1
- [@twilio/notifications](https://npm.io/package/@twilio/notifications.md) ^3.0.2
- [@twilio/operation-retrier](https://npm.io/package/@twilio/operation-retrier.md) ^5.0.0
- [@twilio/replay-event-emitter](https://npm.io/package/@twilio/replay-event-emitter.md) ^1.0.0
- [@twilio/deprecation-decorator](https://npm.io/package/@twilio/deprecation-decorator.md) ^1.0.0
- [@twilio/declarative-type-validator](https://npm.io/package/@twilio/declarative-type-validator.md) ^1.0.0

## Recent versions

- 3.0.1 (latest) — 2026-09-01
- 3.0.1-rc.0 (rc) — 2026-08-31
- 3.0.0-rc.14 (alpha) — 2026-03-17
- 2.6.6-canary.14 (canary) — 2026-02-19
- 3.0.0 — 2026-03-18
- 3.0.0-rc.13 — 2026-03-17
- 3.0.0-rc.12 — 2026-03-03
- 2.7.0 — 2026-02-19
- 2.7.0-rc.3 — 2026-02-19
- 2.7.0-rc.1 — 2026-02-19
- 2.6.6-canary.13 — 2026-02-19
- 2.6.5 — 2025-11-18
- 2.6.5-rc.1 — 2025-11-18
- 2.6.4 — 2025-09-29
- 2.6.4-rc.4 — 2025-09-16
- … 154 more at https://npm.io/package/@twilio/conversations/versions

## README

# Twilio Conversations client library

Twilio Conversations: Create meaningful connections with customers across various communication channels.
Visit our official site for more detalis: [https://www.twilio.com/conversations](https://www.twilio.com/conversations)

## Instantiating and using

To use the library you need [to generate a token](https://www.twilio.com/docs/conversations/create-tokens) and pass it to the Conversations Client constructor.

### NPM

```
npm install --save @twilio/conversations
```

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

```
const { Client } = require('@twilio/conversations');

const client = new Client(token);

// Before you use the client, subscribe to the `'initialized'` event.
client.on('initialized', () => {
  // Use the client.
});

// To catch client initialization errors, subscribe to the `'initFailed'` event.
client.on('initFailed', ({ error }) => {
  // Handle the error.
});
```

The SDK could also be imported using the ES module syntax:

```
import { Client } from '@twilio/conversations';

const client = new Client(token);

// Before you use the client, subscribe to the `'initialized'` event.
client.on('initialized', () => {
  // Use the client.
});

// To catch client initialization errors, subscribe to the `'initFailed'` event.
client.on('initFailed', ({ error }) => {
  // Handle the error.
});
```

### CDN

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

```html
<script src="https://sdk.twilio.com/js/conversations/v4.0/twilio-conversations.min.js"></script>
```

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

```
const client = new Twilio.Conversations.Client(token);
```

### Security

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](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) 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:

```html
<script
  src="https://sdk.twilio.com/js/conversations/releases/4.0.0/twilio-conversations.min.js"
  integrity="sha256-<HASH FROM THE CHANGELOGS PAGE>"
  crossorigin="anonymous"
></script>
```

Find the hash of each release published on the [Changelog](#changelog) page.

### Changelog

See this [link](https://www.twilio.com/docs/conversations/javascript/changelog).

---
_Source: https://npm.io/package/@twilio/conversations · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
