2.5.0 • Published 7 months ago

@twilio/conversations v2.5.0

Weekly downloads
1,955
License
MIT
Repository
-
Last release
7 months ago

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

Instantiating and using

To use the library you need to generate a token 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.

<script src="https://sdk.twilio.com/js/conversations/v2.5/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 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="https://sdk.twilio.com/js/conversations/releases/2.5.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 page.

Changelog

See this link.

2.4.1

11 months ago

2.5.0-rc.0

9 months ago

2.5.0-rc.8

8 months ago

3.0.1-rc.103

11 months ago

2.5.0

7 months ago

2.4.1-rc.1

11 months ago

2.4.1-rc.0

11 months ago

3.0.1-rc.1

12 months ago

3.0.1-rc.102

11 months ago

2.4.0

1 year ago

2.4.0-rc.2

1 year ago

2.4.0-rc.1

1 year ago

2.3.0-rc.2

1 year ago

2.3.0-rc.1

1 year ago

2.3.0-rc.4

1 year ago

2.3.0-rc.3

1 year ago

2.3.0-rc.5

1 year ago

2.3.0

1 year ago

2.4.0-rc.0

1 year ago

2.3.1-rc.0

1 year ago

2.3.0-rc.0

1 year ago

2.2.2

1 year ago

2.2.2-rc.1

1 year ago

2.2.2-rc.3

1 year ago

2.2.2-rc.4

1 year ago

3.0.0-canary.2

1 year ago

2.2.1

1 year ago

2.2.1-rc.0

1 year ago

2.2.0-rc.15

2 years ago

2.2.0-rc.14

2 years ago

2.2.0-rc.13

2 years ago

2.2.0

2 years ago

2.2.0-rc.12

2 years ago

2.2.0-rc.10

2 years ago

2.2.0-rc.7

2 years ago

2.2.0-rc.5

2 years ago

2.2.0-rc.11

2 years ago

2.2.0-rc.9

2 years ago

3.0.0-canary.13

2 years ago

3.0.0-rc.6

2 years ago

3.0.0-rc.5

2 years ago

3.0.0-rc.9

2 years ago

3.0.0-rc.8

2 years ago

3.0.0-rc.7

2 years ago

3.0.0-canary.9

2 years ago

3.0.0-canary.5

2 years ago

3.0.0-rc.1

2 years ago

2.1.0

2 years ago

2.1.0-rc.6

2 years ago

2.1.0-rc.5

2 years ago

2.1.0-rc.9

2 years ago

2.1.0-rc.8

2 years ago

2.1.0-rc.7

2 years ago

2.0.1

2 years ago

2.0.1-rc.12

2 years ago

2.1.0-rc.1

2 years ago

2.1.0-rc.0

2 years ago

2.0.1-canary.2

2 years ago

2.0.1-canary.1

2 years ago

2.0.1-rc.7

2 years ago

2.0.1-rc.8

2 years ago

2.0.1-rc.9

2 years ago

2.0.1-rc.10

2 years ago

2.0.1-rc.4

3 years ago

2.0.1-rc.5

2 years ago

2.0.1-rc.6

2 years ago

2.0.1-rc.2

3 years ago

2.0.1-rc.3

3 years ago

2.0.1-rc.1

3 years ago

2.0.0

3 years ago

2.0.0-rc.3

3 years ago

2.0.0-rc.4

3 years ago

2.0.0-rc.1

3 years ago

2.0.0-rc.0

3 years ago

1.2.4-rc.11

3 years ago

1.2.4-rc.10

3 years ago

1.2.4-rc.12

3 years ago

1.2.4-rc.7

3 years ago

1.2.4-rc.9

3 years ago

1.2.4-rc.3

3 years ago

1.2.4-rc.4

3 years ago

1.2.4-rc.5

3 years ago

1.2.4-rc.2

3 years ago

1.2.3

3 years ago

1.2.3-rc1

3 years ago

1.2.2

3 years ago

1.2.2-rc2

3 years ago

1.2.2-rc1

3 years ago

1.3.0-rc8

3 years ago

1.2.1

3 years ago

1.2.1-rc3

3 years ago

1.3.0-rc7

3 years ago

1.2.1-rc1

3 years ago

1.2.1-rc2

3 years ago

1.3.0-rc6

3 years ago

1.3.0-rc5

3 years ago

1.3.0-rc4

3 years ago

1.2.0

3 years ago

1.3.0-rc1

3 years ago

1.3.0-rc3

3 years ago

1.3.0-rc2

3 years ago

1.2.0-rc7

3 years ago

1.2.0-rc6

3 years ago

1.2.0-rc5

3 years ago

1.2.0-rc4

3 years ago

1.2.0-rc3

3 years ago

1.1.0

4 years ago

1.1.0-rc4

4 years ago

1.1.0-rc3

4 years ago

1.1.0-rc2

4 years ago

1.1.0-rc1

4 years ago

1.0.0

4 years ago

1.0.0-rc5

4 years ago

1.0.0-rc4

4 years ago

1.0.0-rc3

4 years ago

1.0.0-rc2

4 years ago

1.0.0-rc1

4 years ago

0.1.0

4 years ago

0.1.0-rc5

4 years ago

0.1.0-rc4

4 years ago

0.1.0-rc2

4 years ago

0.0.1-rc4

4 years ago

0.0.1-rc2

4 years ago