Title
Ruby On Rails Send SMS
Body

To send SMS on a rails application you could follow the below steps

Step 1.) Login into http://www.twilio.com/ and get twilio account SID and TOKEN.

Step 2.)  In your rails application Gemfile add gem 'twilio-ruby'.

Step 3.) Do bundle install.

Step 4.) Now in your controller/action do the following:--

              require 'twilio-ruby'

              @account_sid = 'Your Twilio SID'

              @account_token = 'Your Twilio TOKEN'

              @client = Twilio::REST::Client.new(@account_sid, @auth_token)

              @client.account.sms.messages.create( :from => '(415) 599-2671',:to => 'client's USA number',:body => 'Hey there!')

That's it!!!

Associated Tags
Ruby,Rails,SMS,sms,send,twilio
Created By
alokanand
Created At
2011-07-29 08:22:03 UTC
Last Updated At
2011-12-09 15:08:38 UTC
Add Comment