Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

twilio-chat

Package Overview
Dependencies
Maintainers
1
Versions
367
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

twilio-chat

Twilio Chat service client library

  • 6.0.0-rc.6
  • npm
  • Socket score

Version published
Weekly downloads
12K
decreased by-46.4%
Maintainers
1
Weekly downloads
 
Created
Source

Twilio Chat client library

Twilio Chat is a service for messages delivery over ip networks. Visit our official site for more detalis: https://www.twilio.com/chat

Instantiating and using

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

NPM

npm install --save twilio-chat

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

const Chat = require('twilio-chat');
Chat.Client.create(token).then(client => {
    // Use client
});

Or, if you prefer async/await syntax:

const Chat = require('twilio-chat');
const client = await Chat.Client.create(token);
// Use client

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

import Chat from 'twilio-chat';
const client = await Chat.Client.create(token);
// Use client

CDN

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

<script src="https://media.twiliocdn.com/sdk/js/chat/v5.0/twilio-chat.min.js"></script>

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

Twilio.Chat.Client.create(token).then(client => {
    // Use client
});

or, if you prefer async/await syntax:

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

Changelog

See this link.

FAQs

Package last updated on 09 Sep 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc