Skip to main content
Version: 5.7.0

SysPostChatMessage

Send a message on behalf of the system to the specified users.

ServiceOperation
chatSYS_POST_CHAT_MESSAGE

Method Parameters

ParameterDescription
channelIdThe id of the channel to post to.
contentThe content to post.
recordInHistoryShould the message be recorded in history? Using 'false' is useful for sending non-conversational messages, like when users join a room, etc.
fromDetails of the user posting the message.

Usage

http://localhost:3000
// S2S call: to view example, switch to the Cloud Code or Raw tab.
JSON Response
{
"status": 200,
"data": {
"msgId": "783347769003570"
}
}
Common Error Code

Status Codes

CodeNameDescription
40601RTT_NOT_ENABLEDRTT must be enabled for this feature
40603CHAT_UNRECOGNIZED_CHANNELThe specified channel is invalid
40616CLOUD_CODE_ONLYMethod only available via cloud code