TwilioDevEd / sdk-starter-node

Demo application showcasing Twilio API usage in Node.js
https://www.twilio.com/docs
MIT License
81 stars 72 forks source link

Chat does not work #44

Open codyvb opened 6 years ago

codyvb commented 6 years ago

Followed the instructions and added the chat service SID.

getting this error

screen shot 2018-07-25 at 11 34 19 am
guillermoarellano commented 5 years ago

Same here.

guillermoarellano commented 5 years ago

Although, the TwilioChat-Node project did work for me. So that at least proves that my account is working well. https://github.com/TwilioDevEd/twiliochat-node

benhulan commented 5 years ago

This is working for me. Make sure you uncomment line 7 of .env file with your chat ID. Remove # so it's just:

TWILIO_CHAT_SERVICE_SID=ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

It also seems the createOrJoinGeneralChannel() is failing to set up a new channel if the 'general' channel is not found, so you can either debug the logic to make that work or just create a "general" chat channel in your Twilio dashboard.

As an alternative you can also just paste the unique chat channel id of any existing channel you already have where it says 'general' on line 65 of /public/chat/index.js so it looks like this: chatClient.getChannelByUniqueName('CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX')