Last active
May 13, 2021 04:44
-
-
Save erikgregorywebb/03c97b0b75044796c7bad34791357390 to your computer and use it in GitHub Desktop.
This file contains 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
from twilio.rest import Client | |
# create client | |
account_sid = 'YOUR-ACCOUNT-SID' | |
auth_token = 'YOUR-AUTH-TOKEN' | |
client = Client(account_sid, auth_token) | |
# define message function | |
def sendMessage(body, from_, to): | |
message = client.messages.create(body = body, from_ = from_, to = to) | |
# send message | |
body = 'Is this thing working?' | |
from_ = 'YOUR-TWILIO-PHONE-NUMBER' | |
to = 'YOUR-OWN-PHONE-NUMBER' | |
sendMessage(body, from_, to) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment