Tune in to watch the keynote — October 17 & 18 at 10am
Build the future of communications.
Start building for free

Get Started With Twilio SMS in Ruby With This Five Minute Video


Sending and receiving text messages in Ruby is delightfully easy. Whether you are sending appointment reminders or working building a marketing notification system you’ll be up and running in no time after watching this five minute video:

Here’s the code from the video for your reference:

require 'sinatra'
require 'twilio-ruby'

post '/receive_sms' do
  content_type 'text/xml'

  response = Twilio::TwiML::Response.new do |r|
    r.Message 'Hey thanks for messaging me!'


post '/send_sms' do
  # Phone number to send to
  to = params["to"]
  # Message to send
  message = params["body"]

  client = Twilio::REST::Client.new(

    to: to,
    from: "+12155844169",
    body: message

What’s Next

Now that you have the power of SMS in your toolbelt you can build all sorts of things. Try one of these as your first project:

I’m really excited to see what you build with Ruby and SMS. Let me know what you’re working on either by email (brent@twilio.com) or find me on Twitter @brentschooley.

Sign up and start building
Not ready yet? Talk to an expert.