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

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?

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?

Hey @markv , thanks for posting and using Zoom! :slight_smile:

To accomplish your goal, you will need to use a Chatbot, which is a service app. You can get started with Chatbots here, or checkout this tutorial:

Thanks,
Tommy

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

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

@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

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:

Thanks,
Max

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