twilio / twilio-chat-demo-js

Programmable Chat API Demo Application for JavaScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated

Please use the new conversations-demo-react.

Running the demo

Set credentials
  1. Copy credentials.example.json to credentials.json
  2. Plug your credentials into credentials.json

You can find the following credentials in your Twilio Console:

Config Value Description
accountSid Your primary Twilio account identifier - find this in the console here.
signingKeySid The SID for your API Key, used to authenticate - generate one here.
signingKeySecret The secret for your API Key, used to authenticate - you'll get this when you create your API key, as above.
serviceSid Like a database for your Chat data - generate one in the console here.
pushCredentialSid Credentials are records for push notification channels for APN and FCM - generate them in the console here and read more about configuring push here.
Install dependencies
$ npm install
Run server
$ npm start
Connect

Connect via http://localhost:8080

Using another version

This demo defaults to using the latest build of the Chat JS SDK. To change to a different version, just open public/index.html and change the following string to point to the URL of the version you'd like to use, for example to use v3.2.1:

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

About

Programmable Chat API Demo Application for JavaScript

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:JavaScript 67.2%Language:CSS 23.0%Language:HTML 9.8%