Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to Send WhatsApp API using python

import http.client
conn = http.client.HTTPSConnection("api.ultramsg.com")
payload = "token=1v941eyo9eqixrsi&to=14155552671&image=https://file-example.s3-accelerate.amazonaws.com/images/test.jpg&caption=image Caption&referenceId="
headers = { 'content-type': "application/x-www-form-urlencoded" }
conn.request("POST", "/instance16/messages/image", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
Source by blog.ultramsg.com #
 
PREVIOUS NEXT
Tagged: #How #Send #WhatsApp #API #python
ADD COMMENT
Topic
Name
2+1 =