-
Notifications
You must be signed in to change notification settings - Fork 0
Z3. Python
Yohannes Mekonnen edited this page Sep 5, 2023
·
1 revision
import http.client
import json
conn = http.client.HTTPSConnection("your_single_url")
payload = json.dumps({
"username": "your_username",
"password": "your_password",
"to": "9xxxxxxxxx",
"text": "your_message"
})
headers = {
'Content-Type': 'application/json'
}
conn.request("POST", "/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
import http.client
import json
conn = http.client.HTTPSConnection("your_list_url")
payload = json.dumps({
"username": "your_username",
"password": "your_password",
"to": [
"9xxxxxxxxx",
"9xxxxxxxxx",
"9xxxxxxxxx"
],
"text": "your_message"
})
headers = {
'Content-Type': 'application/json'
}
conn.request("POST", "/", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))