Skip to main content

Post Channel Message

Send Channel Message

https://api.deadsimplechat.com/consumer/api/v1/chatroom/:roomId/channel/:channelId/message

Post Send Channel Message

Send Message to the Channel inside of a Chat Room

Send Channel MessageTypeDescription
Path Parameters
roomIdstringID of the chat room where you want to send the message
channelIdstringID of the channel where you want to send the message
Query Parameters
authstringGo to Dashboard -> Developer -> Private Key is your auth
Body Parameters
userobjectCreate a user on the fly and send a message as the user. User object has the following properties: { "username": <Required username of the user>, "externalProfilePic":<Optional: URL of the ProfilePic> }
userAccessTokenstringAccess Token of the user, message will be sent by the user whose accessToken is provided (recommended way)
systemMessagebooleanSend this Message as System Message (recommended way)
messagestringMessage you want to send

Responses Remaining

200

JSON

{
"success": true,
}

404

JSON

{
"message": "invalid chatroom id"
}

Either you have to send user or userAccessToken or systemMessage only one has to be sent.

System Message: If you want the message to appear sent from the server, select the System Message

User: Sending the message as a User would create a new user, and the message would be sent as the user, the user-created would be just for the purpose of sending this message, is you want to send very low volume messages into the chat room with a new username and profile picture based on backend logic then you could this. Only use this if you have a use case where each message is sent as a new user which is programatically generated

User Access Token: If you want to send the message as another user, you can use this mode. It can be used un use-cases where user has replied via some other method e.g: via email and you can call this API on the backend to send the message into the Chat Room as the user.

It can also be used to build user interfaces for 3rd party bots, you can use the Create User API to create a user for the bot with a username and profile picture, and in the bot's configuration you can specify the accessToken and this API to allow the bot to send the messages into the Chat Room.