Skip to content

Instantly share code, notes, and snippets.

@mbmccormick
Created October 9, 2011 01:11
Show Gist options
  • Save mbmccormick/1273136 to your computer and use it in GitHub Desktop.
Save mbmccormick/1273136 to your computer and use it in GitHub Desktop.
Telephony Made Easy with Twilio (Part 1)
def sendText(self, text, destination):
ApiVersion = "2008-08-01"
AccountSid = "AXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
AuthToken = "YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY"
account = twilio.Account(AccountSid, AuthToken)
d = {
'To' : destination,
'From' : '505-609-8968',
'Body' : "Remindable: " + text
}
account.request('/%s/Accounts/%s/SMS/Messages' % (ApiVersion, AccountSid), 'POST', d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment