发送消息
URL: http://10.136.39.230:8080/cnlive_room/api/message/chatroom/publish
请求方式: HTTP POST
请求参数说明:
| 参数名 | 参数类型 | 必选 | 参数说明 |
|---|---|---|---|
| appId | String | true | 应用ID |
| sid | String | true | 用户ID |
| chatroomId | String | true | 聊天室ID,多个参数以英文,号分割; 可以实现向多个聊天室发送消息 |
| msgType | String | true | 消息类型(仅支持文本和图片消息) (文本消息: RC:TxtMsg; 图片消息:RC:ImgMsg; 图文消息:RC:ImgTextMsg;位置消息:RC:LBSMsg; 提示条(小灰条)通知消息:RC:InfoNtf; 语音消息:RC:VcMsg;资料通知消息:RC:ProfileNtf |
| msg | String | true | 消息内容 |
| imageUrl | String | false | 图片URL,(消息类型为:RC:ImgMsg时,此参数必须传) |
返回格式: JSON
返回格式样例:
{
"errorCode": "0",
"errorMessage": "发送聊天室消息成功",
"data": {}
}