Python Example
Continuing from the example in Your First Message Template, you can send your transactional message in python with the following.
import requests
from requests.structures import CaseInsensitiveDict
​
url = "https://txnhog.co/txn/api/your_message_key"
​
headers = CaseInsensitiveDict()
headers["Content-Type"] = "application/x-www-form-urlencoded"
​
data = "apiKey=sdkrjwhaldkgh3pwdfohawp4lyu&name=Shawn%20Spencer&phone=2085559988"
​
​
resp = requests.post(url, headers=headers, data=data)
​
print(resp.status_code)
Copy link