Skip to main content
Version: 5.7.0

SysGetChatMessage

tip

This method is available in Cloud Code scripts only.

Retrieves a chat message object from history. If the message cannot be found, that data section returned will be empty.

ServiceOperation
chatSYS_GET_CHAT_MESSAGE

Method Parameters

ParameterDescription
channelIdThe channel of the message
msgIdThe message id

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"status": 200,
"data": {
"date": 1529978814276,
"ver": 1,
"msgId": "783349152909363",
"from": {
"id": "004a7d0c-4e96-474b-972b-7794e0eec8d5",
"name": "",
"pic": null
},
"chId": "22682:gl:brainCloudDev",
"content": {
"text": "Hello world",
"rich": {
"somethingCustom": "wow"
}
}
}
}
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