发送消息

API 地址

api.yun.vhall.com/api/v1/channel/sent

描述

通过频道作为载体,可根据类型发送消息

入参

关于公共请求参数详细内容,请参考 公共请求参数

参数 类型 是否必选 含义
type string 自定义消息 : CustomBroadcast, Chat
body string 消息体 (编码:utf8)
channel_id string 频道ID
client string 客户端: js, android, ios, type=Chat时 必填
room_id string 直播房间ID
third_party_user_id string 第三方用户ID type=Chat时 必填

type 类型列表

参数 类型 含义
CustomBroadcast string 自定义消息

出参

参数 类型 是否必选 含义

错误码

参数 类型 含义
10010 int 消息类型不能为空
10016 int 频道ID不能为空
20004 int 频道查询为空
30002 int 不是当前频道拥有者
40002 int 消息类型不正确
40012 int 消息体过长,最长为1000
50002 int 消息发送失败
40013 int 客户端类型不能为空
40014 int 客户端类型错误
10012 int 第三方用户ID不能为空

响应格式

{
    "code": 200,
    "msg": "",
    "data": []
}