Coder Social home page Coder Social logo

react-programmable-chat's Introduction

Twilio Programmable Chat on React

This is an implementation of Twilio Programmable Chat using React.

Setting up the app

To run this application you will need four configuration parameters, available from your Twilio console.

Config Value Description
Service Instance SID Like a database for your Programmable Chat data - generate one in the console here
Account SID Your primary Twilio account identifier - find this in the console here.
API Key Used to authenticate - generate one here.
API Secret Used to authenticate - just like the above, you'll get one here.

A Note on API Keys

When you generate an API key pair at the URLs above, your API Secret will only be shown once - make sure to save this in a secure location, or possibly your ~/.bash_profile.

Setting Up The Node.js Application

Create a configuration file for your application:

cp .env.example .env

Edit .env with the four configuration parameters we gathered from above.

Next, we need to install our dependencies from npm:

npm install
cd client/
npm install
cd ..

Now you are ready! Run the application with

npm start

Your application should start up at http://localhost:3000.

react-programmable-chat's People

Contributors

aitorpm avatar philnash avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-programmable-chat's Issues

Not Working

At localhost:3001 it says that Cannot GET /

Any solutions?

Creating the hook version of this programmable chat

Hello, I'm facing an issue where I initialize the Twilio object in ReactJS (using hooks) and then any method that I use is undefined.

 let chatClient = new TwilioChat(token.data.jwt)
            chatClient.createChannel({uniqueName:'General', friendlyName:'General Chat'})

I getChannel with provided unique name already exists
and I get back TypeError: Cannot read property 'getChannelByUniqueName' of undefined
when using this method

Can't connect to twilsock

when I try connecting to Twilio-chat to get chatClient I keep getting this error TransportUnavailableError: Can't connect to twilsock at Upstream.send

No work!

Hi!

In localhost:3000 I can't see nothing, no work.

cp .env.example .env
npm install
npm start

run localhost:3000 ----> ERR_CONNECTION_REFUSED

:S

Date separator between messages form diferent dates not showing

Hi, this is more of a question than an issue.

For some reason copying your example there are no date separators for messages. I was wondering if you knew what configuration I should tweak to get that showing? Twilio documentation of the chat is really bad and I can't find anything.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.