开发者

Text Messages & Ruby on Rails

Is there any way to use text messages to CRUD data in a Rails app? For instance, a user would send a text message to a specific number and the开发者_JAVA技巧 Rails app could use that data in any way. Just wondering if there's a solution out there.


Lots of web services exist to do this. Try out http://twilio.com/.


my name is Jarod and I work at Twilio.com. It would be very easy to build a Rails app that handles incoming SMS using the Twilio API. Here is a high-level overview of how it would work:

  1. Sign up for twilio
  2. Point your new Twilio number SMS Url to the Rails controller/action you'd like to invoke.
  3. Process the incoming request and do something with the data.

Note: When Twilio makes the request to your Rails app it will pass helpful parameters with the request including:

  • From: The phone number that sent this message.
  • To: The phone number of the recipient.
  • Body: The text body of the message. Up to 1600 characters long.
  • NumMedia: The number of media items associated with your message
  • Some geographic data like City, State, etc.

Here is a simple Rails app that does just that.

Hope this helps!

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜