Created
January 27, 2012 15:47
-
-
Save scpike/1689377 to your computer and use it in GitHub Desktop.
Make a phone call with twilio
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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