Last active
November 16, 2017 14:36
-
-
Save toast38coza/a1a3fbf0933006bae7a96a795b24bc87 to your computer and use it in GitHub Desktop.
Zoom Connect send SMS
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 characters
import requests | |
def send_sms(to, content): | |
token = '..' | |
email = '..' | |
headers = {'Content-type': 'application/json', 'Accept': 'application/json'} | |
params = { | |
token: token, | |
email: email | |
} | |
data = { | |
"recipientNumber": to, | |
"message": message | |
} | |
url = 'https://www.zoomconnect.com:443/v1/sms/send' | |
return requests.post(url, json=data, params=params, headers=headers) | |
# send an sms: | |
send_sms('+27...', 'testing') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment