Unable to send media images
sunilsankar opened this issue · 1 comments
sunilsankar commented
When I try to send a image I get this error
import requests
url = "http://192.168.1.15:8084/message/sendMedia/chatbot"
payload = {
"number": "XXXXXXXX@s.whatsapp.net",
"options": {
"presence": "composing",
"quotedMessageId": 1
},
"mediaMessage": {
"mediatype": "image",
"fileName": "15814577162.png",
"caption": "string",
"media": "https://www.speedtest.net/result/15814577162.png"
}
}
headers = {
"Content-Type": "application/json",
"Authorization": "password"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
This is error I see in the log
0|chatbot-whatsapp | [CodeChat] 45519 - Thu Jun 06 2024 09:52:44 ERROR [JwtGuard] [object]
0|chatbot-whatsapp | { status: 401, error: 'Unauthorized', message: undefined }
sunilsankar commented
syntax error I fixed it thanks