Skip to content

Demo chat app for use in Conversations Quickstart, with updated UI.

Notifications You must be signed in to change notification settings

prakhar-c20y/conversations-demo

 
 

Repository files navigation

The Demo Conversations App

This is a lightweight application based on Twilio Chat.

Configuring and getting started

This demo requires a Twilio account and a working Chat Service SID. You'll need to collect some credentials from the Twilio Console:

  • Your Account SID (ACXXX) and Auth Token, both accessible from the Dashboard
  • Your Account's Chat Service Sid ISXXX SID which is attached to your Chat Service

Testing

The demo application can be configured and run in two ways:

Replacing the Chat Token

In order for your Chat Application to work, we need to authenticate a Chat user by retrieving a short-lived token attached to your API Key. The getToken function in ConversationsApp.js has a placeholder for your chat token.

You can generate a token in a few ways:

For the twilio-cli option, run the following command and enter the resulting token into the placeholder:

twilio token:chat --identity <The test chat username> --chat-service-sid <ISXXX...>

After generating a token manually, it will expire after a timeout period, so you will need to replace the token. To use this in production software, you would typically create a token endpoint in your back end application that uses your existing user authentication strategy.

About

Demo chat app for use in Conversations Quickstart, with updated UI.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 82.3%
  • CSS 13.4%
  • HTML 4.1%
  • Shell 0.2%