exotel

Ruby interface to the Exotel API

Install

gem install exotel-api-client

Requirements

  • httparty

Examples

Setup

require 'exotel-api-client'

# put your credentials here
 = '<My Exotel SID>'
 = '<My Exotel Token>'

# set up a client that will talk to the Exotel REST API
@client = Exotel::Client.new(, )

Send An SMS

sms_data = {
  "From" => "<6-character Sender ID>"
  "To"   => "<Phone Number>"
  "Body" => "<SMS content>"
}

client.Sms.post(sms_data)

Get Status of An SMS

client.SMS.Messages({:sid => '<SmsSid>'})

Get Call Details

client.Calls({:sid => '<CallSid>'})