2

(This has been solved please read at the bottom for what fixed the issue.)

I am having trouble receiving Twilio's SMS texts from Rocket.Chat's LiveChat

In the admin panel on rocket.chat I put in the correct Twilio's "ACCOUNT SID" and "AUTH TOKEN"

I also put the correct webhook details on Twilio's 'A message comes in': https://blahblah.ngrok.io:3000/api/v1/livechat/sms-incoming/twilio

I followed the details from:

https://github.com/RocketChat/Rocket.Chat.RaspberryPi#start-of-content

and

RocketChat: How to send SMS Messages to Livechat channel from mobile

I have Rocket.Chat server running on a Raspberry Pi 3+ B model with Raspbian Buster OS.

Im using ngrok to tunnel and able to access my rocket.chat server on the web when using the ngrok http url.

Twilio's Debugger shows "HTTP retrieval failure Error 11200"

I also have tested this on Ubuntu Server on raspberry, same exact problem as above.

I also have tested this on Ubuntu on MacBook Air, same exact problem as above.

Please view the pictures below:

image 1

image 2

image 3

image 4

image 5

image 6

EDIT:

This has been solved thanks to Alan's comment: "Don't put the port 3000 on the Ngrok URL (. You tell Ngrok what port to send to your app via the configuration and you just send to the Ngrok URL using HTTPS or HTTP."

On Twilio's 'Message comes in' webhook URL, I removed port ":3000" from "https://e60c0c8a.ngrok.io:3000/api/v1/livechat/sms-incoming/twilio" and it solved the problem.

The proper webhook URL syntax that solved the issue is: "https://your_rocketchat_url/api/v1/livechat/sms-incoming/twilio"

S To
  • 65
  • 5
  • 1
    Twilio will time out after 15 seconds (and that error 11200 indicates a timeout). I accessed your ngrok link and it just sits there for a loooooong time. – ceejayoz Aug 18 '19 at 15:48
  • That’s because I closed the server. But when the server was turned on, I tested the ngrok tunnel url from my iPhone and I can access rocket.chat – S To Aug 18 '19 at 16:26
  • In under 15 seconds? – ceejayoz Aug 18 '19 at 16:30
  • yes correct, in under 15 seconds. Something that is totally weird and unusual is that I got it to work perfectly when I restarted a new ngrok tunnel. I was able to receive and send SMS from rocket.chat's livechat. But now its not working, did a fresh raspbian OS install and reinstalled everything like 30 times. – S To Aug 18 '19 at 16:32
  • 1
    Hi, please revoke your Twilio auth token. Auth Tokens and How to Change Them https://support.twilio.com/hc/en-us/articles/223136027-Auth-Tokens-and-How-to-Change-Them Twilio does an HTTP POST by default, you can change it to a GET, maybe that is the issue? – Alan Aug 18 '19 at 22:49
  • 1
    Don't put the port 3000 on the Ngrok URL (. You tell Ngrok what port to send to your app via the configuration and you just send to the Ngrok URL using HTTPS or HTTP. – Alan Aug 18 '19 at 23:21
  • @Alan thank you for replying. I have changed to 'HTTP GET' and it did not make any difference but removing the port 3000 from the 'message come in' webhook completely solved the issue! Thank You Alan for solving the nightmare problem! – S To Aug 19 '19 at 01:53

1 Answers1

2

This has been solved thanks to Alan's comment: "Don't put the port 3000 on the Ngrok URL (. You tell Ngrok what port to send to your app via the configuration and you just send to the Ngrok URL using HTTPS or HTTP."

On Twilio's 'Message comes in' webhook URL, I removed port ":3000" from "https://e60c0c8a.ngrok.io:3000/api/v1/livechat/sms-incoming/twilio" and it solved the problem.

The proper webhook URL syntax that solved the issue is: "https://your_rocketchat_url/api/v1/livechat/sms-incoming/twilio"

Alan
  • 7,708
  • 2
  • 6
  • 8