Skip to content

Instantly share code, notes, and snippets.

@scpike
Created January 27, 2012 15:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scpike/1689377 to your computer and use it in GitHub Desktop.
Save scpike/1689377 to your computer and use it in GitHub Desktop.
Make a phone call with twilio
def twilio_call
twilio_client = Twilio::REST::Client.new(TWILIO_CLIENT_ID, TWILIO_CLIENT_SECRET)
# Make the call
call = twilio_client.account.calls.create( :from => '12018774274', :to => user.mom_phone_number, :url => 'http://hashtagmom.com/handle_call' )
# Store the SID from Twilio for use in later lookups
self.twilio_call_id = call.sid
save
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment