Skip to content

Instantly share code, notes, and snippets.

@dobestan
Created October 6, 2016 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dobestan/41645cd0c5e789ab7e6685c29aa56fcb to your computer and use it in GitHub Desktop.
Save dobestan/41645cd0c5e789ab7e6685c29aa56fcb to your computer and use it in GitHub Desktop.
def send_sms(sender, receiver, content):
url = "http://api.openapi.io/ppurio/1/message/sms/dobe/"
headers = {
"x-waple-authorization": "MTkyMC0xNDEzODU0NTAwMzU3LTllM2VkOTM3LTYwMTEtNGU2Zi1iZWQ5LTM3NjAxMTNlNmYyMg=="
}
data = {
"send_phone": sender,
"dest_phone": receiver,
"msg_body": content
}
response = requests.post(url, headers=headers, data=data)
return response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment