-
-
Save kimthostrup/80f9c298e3732abaf12d30ed0db4c66d 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