Created
January 10, 2021 19:54
-
-
Save dsasse07/6933ab99a4b7eee4244daba37dc92f5d to your computer and use it in GitHub Desktop.
Twilio Send SMS code snippet from Twilio CodeExchange
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
require 'twilio-ruby' | |
account_sid = 'ACcd207c4be71151a3f50ef05c79e865d5' | |
auth_token = 'yyyyyyyyyyyyyyyyyyyyyyyyy' | |
client = Twilio::REST::Client.new(account_sid, auth_token) | |
from = '+15551234567' # Your Twilio number | |
to = '+15555555555' # The mobile number the text will be sent to | |
client.messages.create( | |
from: from, | |
to: to, | |
body: "Hey friend!" | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment