# Post a message to a chat channel using REST / JWT app

**URL:** <https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579>\
**Category:** API and Webhooks\
**Created:** [March 12, 2021, 6:15pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579 "2021-03-12T18:15:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![markv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/markv/32/24480_2.png) [@markv](https://devforum.zoom.us/u/markv)\
**Post date:** [March 12, 2021, 6:15pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/1 "2021-03-12T18:15:14Z")

</div>

I created a JWT app for the purpose of posting chat messages via the REST API. I think a JWT app is appropriate for this, as opposed to a chatbot, since the message will be posted from an internal server.

Is there an API endpoint that will let me do this?

---

<div class="post-metadata">

**Author:** ![markv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/markv/32/24480_2.png) [@markv](https://devforum.zoom.us/u/markv)\
**Post date:** [March 12, 2021, 11:47pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/2 "2021-03-12T23:47:58Z")

</div>

So there seem to be three possible endpoints to post a chat message to… somewhere:

**POST /chat/users/{userId}/messages**

This endpoint requires a userId, but I’m looking to do this with a service app (no user).

**POST /im/chat/messages**

This endpoint is meant to be used by chatbots, so (maybe?) would require an OAuth request to convert the JWT into an access token. So how would I do this?

**POST /im/users/me/chat/messages**

This is marked as deprecated, and the details are insufficient to know if it would work anyway.

So, any pointers?

---

<div class="post-metadata">

**Author:** ![tommy](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/tommy/32/72769_2.png) [@tommy](https://devforum.zoom.us/u/tommy)\
**Post date:** [March 15, 2021, 3:01pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/3 "2021-03-15T15:01:46Z")

</div>

Hey @markv , thanks for posting and using Zoom! 🙂

> [@markv](#):
>
> **POST /im/chat/messages**
> 
> This endpoint is meant to be used by chatbots, so (maybe?) would require an OAuth request to convert the JWT into an access token. So how would I do this?

To accomplish your goal, you will need to use a Chatbot, which is a service app. You can [get started with Chatbots here](https://marketplace.zoom.us/docs/guides/chatbots/installation-and-authentication), or checkout this tutorial:

[https://marketplace.zoom.us/docs/guides/chatbots/build-a-chatbot](https://marketplace.zoom.us/docs/guides/chatbots/build-a-chatbot)

Thanks,  
Tommy

---

<div class="post-metadata">

**Author:** ![markv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/markv/32/24480_2.png) [@markv](https://devforum.zoom.us/u/markv)\
**Post date:** [March 16, 2021, 4:05pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/4 "2021-03-16T16:05:49Z")

</div>

ok, thanks for the pointer. I’ve created a chatbot, although it seems like overkill for the intended purpose.

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 16, 2021, 10:43pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/5 "2021-03-16T22:43:16Z")

</div>

Hey @markv,

I’m glad to hear that helped! Our Chat Bots are designed to be an automated user that posts messages in your chat and is also able to interact with your users if you design it to do so. I think for your use case, it’s a great fit.

Let us know if you encounter any further issues or questions.

Thanks,  
Max

---

<div class="post-metadata">

**Author:** ![markv](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/markv/32/24480_2.png) [@markv](https://devforum.zoom.us/u/markv)\
**Post date:** [March 16, 2021, 10:57pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/6 "2021-03-16T22:57:10Z")

</div>

@MaxM, yes, it does seem like chatbots are the way to go. I marked Tommy’s answer as the solution.

I have another question posted to this forum, and will have a few more after that too.

Thanks for the help

Mark

---

<div class="post-metadata">

**Author:** ![MaxM](https://sea2.discourse-cdn.com/flex016/user_avatar/devforum.zoom.us/maxm/32/42303_2.png) [@MaxM](https://devforum.zoom.us/u/MaxM)\
**Post date:** [March 16, 2021, 11:00pm UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/7 "2021-03-16T23:00:36Z")

</div>

Hey @markv,

I spotted your post and was able to respond. I’m happy to help out with any issues/questions you have! Please submit a ticket as outlined in that post:

> [@Problems trying to post to a chat from Chatbot](https://devforum.zoom.us/t/problems-trying-to-post-to-a-chat-from-chatbot/45854/2):
>
> Hey @markv, Thank you for reaching out to the Zoom Developer Forum. Please send an email to [developersupport@zoom.us](mailto:developersupport@zoom.us) with a link to this thread. In that email, please include the full request body that you’re using. I’ll investigate the issue further from there. Thanks, Max

Thanks,  
Max

---

<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:** [April 16, 2021, 9:00am UTC](https://devforum.zoom.us/t/post-a-message-to-a-chat-channel-using-rest-jwt-app/45579/8 "2021-04-16T09:00:39Z")

</div>

Closed on April 16, 2021, 9:00am UTC

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