Ruby interface to the Exotel API
gem install exotel-api-client
- httparty
require 'exotel-api-client'
# put your credentials here
account_sid = '<My Exotel SID>'
account_token = '<My Exotel Token>'
# set up a client that will talk to the Exotel REST API
@client = Exotel::Client.new(account_sid, account_token)
sms_data = {
"From" => "<6-character Sender ID>"
"To" => "<Phone Number>"
"Body" => "<SMS content>"
}
client.Sms.post(sms_data)
client.SMS.Messages({:sid => '<SmsSid>'})
client.Calls({:sid => '<CallSid>'})