Revisions
-
Mat Munn created this gist
Mar 7, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/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")