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.
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.
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: