Channelize.io allows you to embed user-to-user chat into your application by API and SDKs in the easiest way.
Signup for Channelize.io 30 Days Free Trial at https://channelize.io/free_trial/request
npm install channelize-chat
You can find out JavaScript SDK documentation here.
First you need to install channelize-chat via NPM. Then you can import like this:
import { Channelize } from 'channelize-chat';
var channelize = new Channelize.client({publicKey: YOUR_PUBLIC_KEY});
// do something...