# Chatbot im/chat/messages error

**URL:** <https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950>\
**Category:** API and Webhooks\
**Created:** [January 23, 2023, 2:39pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950 "2023-01-23T14:39:02Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![wandrille](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@wandrille](https://devforum.zoom.us/u/wandrille)\
**Post date:** [January 23, 2023, 2:39pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/1 "2023-01-23T14:39:02Z")

</div>

**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](mailto:XXX@xmpp.zoom.us)”,  
“to\_jid”: “[XXX@xmpp.zoom.us](mailto:XXX@xmpp.zoom.us)”,  
“content”: {  
“head”: {  
“text”: “test”  
}  
}  
}

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

---

<div class="post-metadata">

**Author:** ![wandrille](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@wandrille](https://devforum.zoom.us/u/wandrille)\
**Post date:** [January 23, 2023, 3:54pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/2 "2023-01-23T15:54:55Z")

</div>

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](https://devsupport.zoom.us/hc/en-us/articles/360060333131-How-to-send-a-Chatbot-Message)

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [January 23, 2023, 10:59pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/3 "2023-01-23T22:59:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wandrille](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@wandrille](https://devforum.zoom.us/u/wandrille)\
**Post date:** [January 24, 2023, 3:14pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/4 "2023-01-24T15:14:47Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![anto1](https://avatars.discourse-cdn.com/v4/letter/a/c5a1d2/32.png) [@anto1](https://devforum.zoom.us/u/anto1)\
**Post date:** [January 24, 2023, 4:53pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/5 "2023-01-24T16:53:51Z")

</div>

what user\_jid did you use?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [January 24, 2023, 5:38pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/6 "2023-01-24T17:38:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ian](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/ian/32/2296_2.png) [@ian](https://devforum.zoom.us/u/ian)\
**Post date:** [May 17, 2023, 10:21am UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/7 "2023-05-17T10:21:14Z")

</div>

We had the same issue but looks like this requirement has now been removed @wandrille ? It now works for us without specifying the user\_jid when posting as the bot in a channel

---

<div class="post-metadata">

**Author:** ![wandrille](https://avatars.discourse-cdn.com/v4/letter/w/9dc877/32.png) [@wandrille](https://devforum.zoom.us/u/wandrille)\
**Post date:** [May 19, 2023, 1:58pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/8 "2023-05-19T13:58:26Z")

</div>

@ian thank you for this info! It does look like the user\_jid is not needed anymore.

@elisa.zoom can you confirm that this is now the valid path forward of not needing the user\_jid?

---

<div class="post-metadata">

**Author:** ![elisa.zoom](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/elisa.zoom/32/47836_2.png) [@elisa.zoom](https://devforum.zoom.us/u/elisa.zoom)\
**Post date:** [May 19, 2023, 4:55pm UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/9 "2023-05-19T16:55:53Z")

</div>

Hey @wandrille let me test this on my end!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/zoomdeveloper/original/3X/6/1/614bdd549b610bbaa46ff934617683a02bdaa03c.png) [@system](https://devforum.zoom.us/u/system)\
**Post date:** [May 22, 2024, 8:32am UTC](https://devforum.zoom.us/t/chatbot-im-chat-messages-error/81950/10 "2024-05-22T08:32:28Z")

</div>

This topic was automatically closed 368 days after the last reply. New replies are no longer allowed.
