Chatbot im/chat/messages error

API Endpoint(s) and/or Zoom API Event(s)
/v2/im/chat/messages

Description
Not able to get this api to work with my chatbot token. Testing it from postman.
Pass in the correct headers of:
Authorization: Bearer ey…
Content-Type: application/json

Body: (raw, json)
{
“account_id”: “XXX”,
“robot_jid”: “XXX@xmpp.zoom.us”,
“to_jid”: “XXX@xmpp.zoom.us”,
“content”: {
“head”: {
“text”: “test”
}
}
}

Error?
{
“code”: 500,
“message”: “Invalid request body format.”,
“result”: false
}

quick update, I am able to get the api to work if I provide the user_jid in the body.

If I do not include user_jid, then it fails. Is the user_jid a required field for this api?
In the following link, its listed as optional: https://devsupport.zoom.us/hc/en-us/articles/360060333131-How-to-send-a-Chatbot-Message

Hi @wandrille
Thanks for reaching out to the Zoom Developer Forum.
I am happy to hear that you were able to figure out this issue.
It looks like we need to update the documentation and include the user_jid as required instead of optional.
I will make sure to pass this feedback to our Docs team.

Thanks again,
Elisa

Thanks for the response.
So for the flow of sending a message from a chatbot to a channel, this means, we would need to pick a user from within that channel to use their user_jid to be able to send the message from the chatbot to the channel?

what user_jid did you use?

Hi @wandrille
It looks like the user_jid is the value of the user on whose behalf the message is being sent.