Skip to content

Instantly share code, notes, and snippets.

@hunnycode
Last active December 17, 2015 13:29
Show Gist options
  • Save hunnycode/5617224 to your computer and use it in GitHub Desktop.
Save hunnycode/5617224 to your computer and use it in GitHub Desktop.
require 'rubygems' # not necessary with ruby 1.9 but included for completeness
require 'twilio-ruby'
# put your own credentials here - from twilio.com/user/account
account_sid = '[account SID]'
auth_token = '[Auth Token]'
# set up a client to talk to the Twilio REST API
@client = Twilio::REST::Client.new account_sid, auth_token
@call = @client.account.calls.create(
:from => '+8150xxxxxxxx', # From your Twilio number
:to => '+8180xxxxxxxx', # To any number
# Fetch instructions from this URL when the call connects
:url => 'http://your URL/call.xml'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment