开发者

Twilio sms question

Uptill now I have been using Twilio for phone calls. Now I want to be able to have a network monitoring tool that texts when there is a problem to a number. I would like to make it so that when twilio receives the text it will execute the script that I have put into开发者_开发知识库 its URL...I really don't know how to get started with sms it seems very hard and complicated as compared to phone calls...Any help on the sms is greatly appreciated to get me started.


If you've already figured Twilio voice calls, you'll find SMS easier once you figure out what they're doing. Which is essentially:

  1. Carrier delivers an SMS to Twilio for a number you're renting from them.
  2. Twilio makes an HTTP POST or GET (you choose) to the URL you setup in their web admin. The content of the text message will be a parameter in there.
  3. You do whatever you want with the POST or GET, returning a TwiML if you want an SMS reply sent or nothing if not.

Note, Twilio can't execute a script for you, unless it's TwiML, in which case you're just returning TwiML as the response to the HTTP call from #3. So if you want to do something in response to an SMS, you'll need build that something into the logic that handles the URL you've given Twilio. If you're still lost a bit, tell us about how you're trying to do this, e.g., you've a Rails app, a PHP website, or just a Bash script you want to run and nothing else yet...


Why not avoid Twilio and have your network monitoring tool execute the script itself?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜