Created
March 7, 2017 01:20
-
-
Save matmunn/be0fb42058a5980f9d2c5cb515fa4e5c 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
#!/usr/local/bin/python | |
import os | |
import plivo | |
import sys | |
from time import strftime | |
if not os.path.isdir(PATH): | |
sys.exit() | |
# returns 'None' if the key doesn't exist | |
PLIVO_AUTH_ID = os.environ.get('PLIVO_AUTH_ID') | |
PLIVO_AUTH_TOKEN = os.environ.get('PLIVO_AUTH_TOKEN') | |
# Phone numbers | |
my_number = '+xxxxxxxxxxx' | |
her_number = '+xxxxxxxxxxx' | |
p = plivo.RestAPI(PLIVO_AUTH_ID, PLIVO_AUTH_TOKEN) | |
params = { | |
'src': my_number, | |
'dst': her_number, | |
'text': u"Looks like I'm working late tonight." | |
} | |
response = p.send_message(params) | |
print "Message sent at " + strftime("%a, %d %b %Y %H:%M:%S") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment