python-scripts/27_send_sms.py
2015-10-15 22:51:07 +01: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!')