Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

接口文档

wuno-hong edited this page Dec 15, 2022 · 17 revisions

接口返回格式

所有接口返回统一使用如下格式,result 是最终的业务结果

{
 "code": "8000",
 "msg": "",
 "success": true,
 "result": {},
 "tid": "",
 "ext": {}
}

sona-web接口

房间管理

创建房间

POST https://xxx/sona/room/create HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomTitle String 房间名称
productCode String 产品码
password String 房间密码
uid String 房主uid
extMap Map 扩展信息

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "serialVersionUID": 0,
 "module": "",
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0,
 "imSendType": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "pullStreamInfoList": [
 {
 "desc": "",
 "streamId": "",
 "supplier": "",
 "pullUrls": [
 {
 "streamId": "",
 "pullUrl": "",
 "definition": "",
 "definitionId": 0,
 "protocol": "",
 "isDefault": false
 }
 ]
 }
 ],
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "playerType": 0,
 "bitrate": 0
 }
 },
 "roomId": "",
 "ownerUid": "",
 "guestUid": "",
 "addr": "",
 "nickname": "",
 "extra": {}
}

进入房间

POST https://xxx/sona/room/enter HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId String 房间Id
password String 房间密码
uid String 用户uid
extMap Map 扩展信息

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "module": "",
 "imSendType": 0,
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
 },
 "roomId": 0,
 "ownerUid": 0,
 "guestUid": 0,
 "nickname": "",
 "extra": {}
}

离开房间

POST https://xxx/sona/room/leave HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "result": false
}

打开房间

POST https://xxx/sona/room/open HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "module": "",
 "imSendType": 0,
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
 },
 "roomId": 0,
 "ownerUid": 0,
 "guestUid": 0,
 "nickname": "",
 "extra": {}
}

关闭房间

POST https://xxx/sona/room/close HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "result": false
}

踢人

POST https://xxx/sona/room/kick HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户

返回说明

{
 "result": false
}

禁言

POST https://xxx/sona/room/mute HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户
minute int 禁言时间

返回说明

{
 "result": false
}

取消禁言

POST https://xxx/sona/mute/cancel HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户
minute int 禁言时间

返回说明

{
 "result": false
}

拉黑

POST https://xxx/sona/room/block HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户
reason String 拉黑原因

返回说明

{
 "result": false
}

取消拉黑

POST https://xxx/sona/room/block/cancel HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户
reason String 取消拉黑原因

返回说明

{
 "result": false
}

设置管理员

POST https://xxx/sona/room/admin/set HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户

返回说明

{
 "result": false
}

取消设置管理员

POST https://xxx/sona/room/admin/cancel HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
targetUid String 被操作用户

返回说明

{
 "result": false
}

更改密码

POST https://xxx/sona/room/password/update HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 操作人
oldPassword String 原密码
newPassword String 新密码

返回说明

{
 "result": false
}

获取房间人数

POST https://xxx/sona/room/member/count HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "result": 0
}

获取房间人员信息

POST https://xxx/sona/room/member/list HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
anchor String 分页锚点
limit int 分页数量

返回说明

{
 "count": 0,
 "end": false,
 "list": [
 {
 "uid": "",
 "role": 0
 }
 ],
 "anchor": "",
 "emptyMsg": ""
}

流相关

获取用户签名

POST https://xxx/sona/stream/gen/userSig HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id

返回说明

{
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
}

静音

POST https://xxx/sona/stream/mute HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
targetUids List 静音用户

返回说明

{
 "result": false
}

取消静音

POST https://xxx/sona/stream/mute/cancel HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
targetUids List 静音用户

返回说明

{
 "result": false
}

同步流配置

POST https://xxx/sona/stream/sync/config HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "roomId": "",
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
}

是否混入mv

POST https://xxx/sona/stream/mixed/mv HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id
mixStatus int 1- 开始混流mv 2- 停止混流mv
width int
height int

返回说明

{
 "result": false
}

消息相关

消息记录查询

POST https://xxx/sona/message/query HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id
anchor String 分页锚点
limit int 分页数量

返回说明

{
 "count": 0,
 "end": false,
 "list": [
 {
 "uid": "",
 "roomId": "",
 "sendTime": 0,
 "content": "",
 "productCode": "",
 "messageId": ""
 }
 ],
 "anchor": "",
 "emptyMsg": ""
}

发送房间消息

POST https://xxx/sona/message/send HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id
priority int 消息优先级(1、2、3、4)
content String 消息内容(json格式)
msgFormat int 消息格式 100:业务 101:文本 102:图片 103:表情 104:语音 105:视频 106:ack
messageId String 消息id
needToSave boolean 是否需要保存
msgType String 消息业务类型

返回说明

{
 "result": false
}

日志上报相关

客户端上报长连日志

POST https://xxx/sona/report/mercury HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
sendTime long 发送时间
common String
desc String
details String
ip String
model String
network String
osVer String
platform String
type String
uid String

返回说明

{
 "result": false
}

Dubbo接口

房间管理

创建房间

cn.bixin.sona.api.room.SonaRoomRemoteService#createRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomTitle String 房间名称
productCode String 产品码
password String 房间密码
uid String 房主uid
extMap Map 扩展信息

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "serialVersionUID": 0,
 "module": "",
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0,
 "imSendType": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "pullStreamInfoList": [
 {
 "desc": "",
 "streamId": "",
 "supplier": "",
 "pullUrls": [
 {
 "streamId": "",
 "pullUrl": "",
 "definition": "",
 "definitionId": 0,
 "protocol": "",
 "isDefault": false
 }
 ]
 }
 ],
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "playerType": 0,
 "bitrate": 0
 }
 },
 "roomId": "",
 "ownerUid": "",
 "guestUid": "",
 "addr": "",
 "nickname": "",
 "extra": {}
}

进入房间

cn.bixin.sona.api.room.SonaRoomRemoteService#enterRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId String 房间Id
password String 房间密码
uid String 用户uid
userTypeEnum UserTypeEnum 普通用户或vip用户
extMap Map 扩展信息

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "module": "",
 "imSendType": 0,
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
 },
 "roomId": 0,
 "ownerUid": 0,
 "guestUid": 0,
 "nickname": "",
 "extra": {}
}

离开房间

cn.bixin.sona.api.room.SonaRoomRemoteService#leaveRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "result": false
}

打开房间

cn.bixin.sona.api.room.SonaRoomRemoteService#openRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "productConfig": {
 "productCode": "",
 "productCodeAlias": "",
 "imConfig": {
 "module": "",
 "imSendType": 0,
 "arrivalMessageSwitch": false,
 "clientQueueSize": 0,
 "messageExpireTime": 0
 },
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
 },
 "roomId": 0,
 "ownerUid": 0,
 "guestUid": 0,
 "nickname": "",
 "extra": {}
}

关闭房间

cn.bixin.sona.api.room.SonaRoomRemoteService#closeRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户uid, 游客模式传0

返回说明

{
 "result": false
}

踢人

cn.bixin.sona.api.room.SonaRoomRemoteService#kickUser HTTP/1.1
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户

返回说明

{
 "result": false
}

禁言

cn.bixin.sona.api.room.SonaRoomRemoteService#muteUser Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
minutes int 禁言时长
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

取消禁言

cn.bixin.sona.api.room.SonaRoomRemoteService#cancelMuteUser Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
minutes int 禁言时长
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

拉黑

cn.bixin.sona.api.room.SonaRoomRemoteService#blockUser Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

取消拉黑

cn.bixin.sona.api.room.SonaRoomRemoteService#cancelBlockUser Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

设置管理员

cn.bixin.sona.api.room.SonaRoomRemoteService#setAdmin Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

取消设置管理员

cn.bixin.sona.api.room.SonaRoomRemoteService#removeAdmin Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
targetUid long 被操作用户
operate int 1:设置 0:取消

返回说明

{
 "result": false
}

更改密码

cn.bixin.sona.api.room.SonaRoomRemoteService#updatePassword Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
operatorUid long 操作人
oldPassword String 原密码
newPassword String 新密码

返回说明

{
 "result": false
}

更新用户分数

cn.bixin.sona.api.room.SonaRoomRemoteService#updateChatroomUserScore Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid long 用户Id
score int 分数

返回说明

{
 "result": false
}

日志上报

cn.bixin.sona.api.room.SonaRoomRemoteService#logReport Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
code int 代码
data long 上报数据
uid long 用户Id
appId long 应用Id
version long 版本
productId long 产品Id
osName long 平台标识

返回说明

{
 "result": false
}

房间查询

查询房间信息

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "roomId": 0,
 "createTime": "2022年12月14日 14:10:50",
 "name": "",
 "password": "",
 "status": 0,
 "uid": 0,
 "productCode": "",
 "ext": {}
}

批量查询房间信息

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getRoomBatch Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomIds List 房间Ids

返回说明

{
 "0" : 
 {
 "roomId": 0,
 "createTime": "2022年12月14日 14:12:26",
 "name": "",
 "password": "",
 "status": 0,
 "uid": 0,
 "productCode": "",
 "ext": {}
 }
}

获取房间人数

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getRoomMemberCount Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "result": 0
}

批量获取房间人数

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#batchGetRoomMemberCount Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomIds List 房间Ids

返回说明

{
 "0" : 
 {
 "result": 0
 }
}

获取房间人员信息

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getRoomMemberList Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
anchor String 分页锚点
limit int 分页数量

返回说明

{
 "count": 0,
 "end": false,
 "list": [
 {
 "uid": "",
 "role": 0
 }
 ],
 "anchor": "",
 "emptyMsg": ""
}

查询用户是否在房间

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#isUserInRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uids List 用户Ids

返回说明

{
 "0" : false
}

获取房间配置

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getRoomConfig Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "roomId": 0,
 "productCode": "",
 "imModule": "",
 "imSendType": 0,
 "streamSupplier": "",
 "type": "",
 "pullMode": "",
 "pushMode": "",
 "enterNotifySwitch": false,
 "checkAdmin": false,
 "needReplay": false,
 "clientType": 0,
 "bitrate": 0
}

获取在线房间列表

cn.bixin.sona.api.room.SonaRoomQueryRemoteService#getOnlineRoomList Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
anchor String 锚点
limit int 限制数

返回说明

{
 "count": 0,
 "end": false,
 "list": [
 {
 "roomId": 0,
 "createTime": "2022年12月14日 14:24:56",
 "name": "",
 "password": "",
 "status": 0,
 "uid": 0,
 "productCode": "",
 "ext": {}
 }
 ],
 "anchor": "",
 "emptyMsg": ""
}

流相关

获取推流ID

cn.bixin.sona.api.room.StreamRemoteService#initStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid long 用户Id

返回说明

{
 "result": 0
}

获取房间拉流地址

cn.bixin.sona.api.room.StreamRemoteService#getRoomStreamUrl Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "result": ""
}

批量获取房间拉流地址

cn.bixin.sona.api.room.StreamRemoteService#getRoomStreamUrlBatch Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomIds List 房间Ids

返回说明

{
 "0" : ""
}

静音

cn.bixin.sona.api.room.StreamRemoteService#muteStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
targetUids List 静音用户

返回说明

{
 "result": false
}

取消静音

cn.bixin.sona.api.room.StreamRemoteService#cancelMuteStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
targetUids List 静音用户

返回说明

{
 "result": false
}

静音房间所有用户

cn.bixin.sona.api.room.StreamRemoteService#muteRoomStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "result": false
}

添加流

cn.bixin.sona.api.room.StreamRemoteService#addStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
streamId String 流Id
uid long 用户Id

返回说明

{
 "result": false
}

关闭流

cn.bixin.sona.api.room.StreamRemoteService#closeStream Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
streamId String 流Id
uid long 用户Id

返回说明

{
 "result": false
}

zego重新混流

cn.bixin.sona.api.room.StreamRemoteService#zegoReMix Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "result": false
}

获取用户签名

cn.bixin.sona.api.room.StreamRemoteService#genUserSign Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id

返回说明

{
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
}

同步房间配置

cn.bixin.sona.api.room.StreamRemoteService#syncRoomConfigByRoomId Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id

返回说明

{
 "roomId": "",
 "streamConfig": {
 "supplier": "",
 "type": "",
 "pushMode": "",
 "pullMode": "",
 "streamList": [
 ""
 ],
 "streamUrl": "",
 "streamId": "",
 "audioToken": "",
 "streamRoomId": {},
 "switchSpeaker": "",
 "appInfo": {
 "appId": 0,
 "appSign": "",
 "token": "",
 "appID": ""
 },
 "bitrate": 0
 }
}

是否混入mv

cn.bixin.sona.api.room.StreamRemoteService#mixedMV Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
uid String 用户id
mixStatus int 1- 开始混流mv 2- 停止混流mv
width int
height int

返回说明

{
 "result": false
}

流回调相关

创建流回调

cn.bixin.sona.api.room.SonaStreamCallbackRemoteService#handleCreateStreamCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
streamId String 流Id
roomId long 房间Id
uid long 用户Id
sdkAppId String
appId int
source int 1:zego 2:tecent
rtmpUrls List
hlsUrls List
hdlUrls List
picUrls List
createTime Date 创建时间

返回说明

{
 "result": false
}

关闭流回调

cn.bixin.sona.api.room.SonaStreamCallbackRemoteService#handleCloseStreamCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
sdkAppId String
streamId String 流id
bizRoomId String biz房间id
roomId String 房间id
closeType int 关闭类型
errMsg String 错误信息
source int 1:zego 2:tecent

返回说明

{
 "result": false
}

创建录像回调

cn.bixin.sona.api.room.SonaStreamCallbackRemoteService#handleCreateReplayCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
sdkAppId String
streamId String 流id
replayUrl String 录像地址
beginTime Date 开始时间
endTime Date 结束时间
source int 1:zego 2:tecent
extraParams Map<String, Object> 额外信息

返回说明

{
 "result": false
}

混流开始回调

cn.bixin.sona.api.room.SonaStreamCallbackRemoteService#handleMixStreamStartCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
streamId String 流id
bizRoomId String biz房间id
source int 1:zego 2:tecent
rtmpUrls List
hlsUrls List
hdlUrls List
picUrls List
createTime Date 创建时间
inputStreamList List 输入流列表
isMix boolean 是否混流

返回说明

{
 "result": false
}

混流结束回调

cn.bixin.sona.api.room.SonaStreamCallbackRemoteService#handleMixStreamEndCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
streamId String 流id
bizRoomId String biz房间id
mixUrl String 混流地址
source int 1:zego 2:tecent
createTime Date 创建时间
isMix boolean 是否混流

返回说明

{
 "result": false
}

热切相关

切换音频运营商单房间

cn.bixin.sona.api.room.HotSwitchRemoteService#switchAudioSupplierRoom Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId long 房间Id
mixed int 流类型

返回说明

{
 "result": false
}

消息回调相关

客户端发送房间消息

cn.bixin.sona.api.im.MessageCallbackService#sendChatroomMessage Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId Long 房间id
uid Long 用户id
priority int 消息优先级
content String 消息内容
msgFormat int 消息类型
messageId String 消息id
needToSave boolean 是否需要保存
msgType String 业务消息类型

返回说明

{
 "result": false
}

消息回调业务方

cn.bixin.sona.api.im.callback.MessageCallbackRemoteService#checkMessageCallback Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId Long 房间id
uid Long 用户id
priority int 消息优先级
content String 消息内容
msgFormat int 消息类型
messageId String 消息id
needToSave boolean 是否需要保存
msgType String 业务消息类型

返回说明

{
 "roomId": 0,
 "uid": 0,
 "priority": 0,
 "content": "",
 "msgFormat": 0,
 "messageId": "",
 "needToSave": false,
 "msgType": ""
}

消息查询相关

查询消息信息

cn.bixin.sona.api.im.MessageQueryService#queryMessageInfo Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
roomId Long 房间id
uid Long 消息发送方uid
reserved boolean 是否倒叙查询
anchor String 分页游标
limit int 分页大小

返回说明

{
 "count": 0,
 "end": false,
 "list": [
 {
 "uid": 0,
 "roomId": 0,
 "sendTime": 0,
 "content": "",
 "productCode": "",
 "messageId": ""
 }
 ],
 "anchor": "",
 "emptyMsg": ""
}

房间消息相关

发送聊天室消息

cn.bixin.sona.api.im.RouterRoomMessageService#sendChatRoomMessage Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
roomId Long 房间id

返回说明

{
 "result": ""
}

发送群组消息

cn.bixin.sona.api.im.RouterRoomMessageService#sendGroupMessage Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
groupId Long 群组id

返回说明

{
 "result": ""
}

批量发送聊天室消息

cn.bixin.sona.api.im.RouterRoomMessageService#sendChatRoomMessages Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
roomId Long 房间id

返回说明

{
 "result": false
}

批量发送群组消息

cn.bixin.sona.api.im.RouterRoomMessageService#sendGroupMessages Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
groupId Long 群组id

返回说明

{
 "result": false
}

发送聊天室点对点消息

cn.bixin.sona.api.im.RouterRoomMessageService#sendChatRoomMessageToUids Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
roomId Long 房间id
uids List 接收者uid

返回说明

{
 "result": ""
}

广播消息给所有聊天室

cn.bixin.sona.api.im.RouterRoomMessageService#boardCastChatRoomMessage Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息

返回说明

{
 "result": ""
}

广播消息给指定聊天室

cn.bixin.sona.api.im.RouterRoomMessageService#sendChatRoomMessage Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid Long 发送者uid
content String 消息内容
sendTime Long 发送时间
messageId String 消息id
productCode String 业务类型
needToSave boolean 是否要保存消息
roomIds List 房间id

返回说明

{
 "result": ""
}

日志上报相关

上报日志

cn.bixin.sona.api.report.MercuryReportRemoteService#report Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
sendTime long 发送时间
common String
desc String
details String
ip String
model String
network String
osVer String
platform String
type String
uid String

返回说明

{
 "result": false
}

用户Session相关

获取用户当前时刻的长连接channelId

cn.bixin.sona.session.api.UserSessionRemoteService#getCurrentChannel Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid long 用户id

返回说明

{
 "result": [""]
}

批量获取用户当前时刻的长连接channelId

cn.bixin.sona.session.api.UserSessionRemoteService#getCurrentChannels Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid List 用户id

返回说明

{
 "0": [""]
}

查询用户当前是否在线

cn.bixin.sona.session.api.UserSessionRemoteService#getOnlineState Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid long

返回说明

{
 "result": false
}

批量查询用户当前是否在线

cn.bixin.sona.session.api.UserSessionRemoteService#getOnlineStates Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uids List 用户id

返回说明

{
 "0": false
}

查询用户当前在哪些聊天室房间

cn.bixin.sona.session.api.UserSessionRemoteService#getChatRoomOnlineStatel Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid long 用户id

返回说明

{
 "result": [""]
}

批量查询用户当前在哪些聊天室房间

cn.bixin.sona.session.api.UserSessionRemoteService#getChatRoomOnlineStates Dubbo/2.7.8
Content-Type: application/json; charset=utf-8

参数说明

参数 类型 必须 说明
uid List 用户id

返回说明

{
 "0": [""]
}

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /