How do I use Twilio to receive text messages from users and reply to that text with a message?

1.) User sends a text message to a designated Twilio phone number 2.) Application receives this message and parses it for actionable data 3.) Application replies to sender with a text message delivering the requested information

How the heck do I do this with rails?!


Assuming your business logic doesn't take that long to execute, it's pretty simple to process a text and send a response. Here are the core steps:

  1. Grab the twilio-ruby helper library.
  2. Point your SMS Url to the Rails controller/action you'd like to invoke
  3. Process the incoming request & execute your business logic
  4. Instead of returning HTML, return TwiML

Here's a link to a simple app that does just this:

Update: I've written two detailed blog posts on integration Twilio into a Rails 4.x app: Part 1 and Part 2.

Need Your Help

How to position a popup right below an object in CSS

html css

I have a TextBox in a css within a table. I can't use position: absolute in the textbox because I am using table. Is there any other way to position and float the popup (hint2) right below the text...

text-indent deformating img in html

html css text-indent

I have a rule to my blog posts that is: