接口名称 | 发送聊天消息 签名 |
地址 | https://api.cnlive.com/open/api2/im_chat/chatroom/publish |
method | post |
返回数据 | json |
参数 | 类型 | 必选 | 说明 |
---|---|---|---|
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 | true | 图片URL,(消息类型为:RC:ImgMsg时,此参数必须传) |
sign | String | true | 签名 |
{
"errorCode": "0",
"errorMessage": "发送聊天室消息成功",
"data": {}
}