Created
November 8, 2017 04:18
-
-
Save developersteve/9ff571d0dd568d5ef729978ea2096a50 to your computer and use it in GitHub Desktop.
TelstraDev MessagingAPI - Basic python call create 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 | |
from var_dump import var_dump | |
url = "https://tapi.telstra.com/v2/messages/sms" | |
payload = {'to': '000000000000', | |
'body': 'Hello World', | |
'from': '000000000000', | |
'validity': 1, | |
'scheduledDelivery': 60, | |
'notifyURL': '', | |
'replyRequest': 'false'} | |
headers = { | |
'accept': 'application/json', | |
'authorization': 'Bearer abcdefghijklmnop', | |
'content-type': 'application/json', | |
} | |
response = requests.post(url, json=payload, headers=headers) | |
var_dump(response.content) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment