Missing API endpoint URL
# 🤝help
h
I wanted to send via API a message on an already started whatsapp chat. It is not clear to me what are the tags to insert in the body. If I try to send the query I get a message: { "codes": 403, "type": "Forbidden", "message": "Bot \"xxxxxxx\" is not authorized to create messages as an integration" } Does anyone have any body sample?
a
@colossal-egg-20510 do you know what this is?
r
@hundreds-petabyte-10180 are you sending an incoming or outgoing message? the bot is not allowed to create incoming messages but can create outgoing messages. Also, try not setting tags? The userId must also be set to the botUserId
h
This is the body: { "userId": "xxxxxx", "conversationId": "xxxxx", "payload": { "text": "Hello" }, "direction": "outgoing", "type": "text", "tags": { } } and this is the answer: { "code": 403, "type": "Forbidden", "message": "Bot \"xxxxxxx\" is not authorized to create messages as an integration" } UserId and conversationId are from a GET on the messages endpoint
I tried again on a newly opened whatsapp chat and it works. Is it possible that the error occurs because I try to send a message on a chat outside the 24 hour window?
r
ohhh
yes it's possible
whatsapp is pretty strict
d
How do I see the base URL to my bot so that I can make api calls
Thanks
3 Views