python-scripts/scripts/27_send_sms.py
2016-12-17 09:22:43 -07:00

13 lines
288 B
Python
Executable File

import requests
message = raw_input('Enter a Message: ')
number = raw_input('Enter the phone number: ')
payload = {'number': number, 'message': message}
r = requests.post("http://textbelt.com/text", data=payload)
if r.json()['success']:
print('Success!')
else:
print('Error!')