列表
GET api/v1/userChannels/list
说明:查看群组列表。
Header
Authorization
String
Bearer ${unifiedAuthToken} ,其中unifiedAuthToken来自/api/v1/auth接口的返回
Request Parameters
keyword
String
群组名称,支持模糊查询
limit
int
每页返回数量
cursor
String
上一页返回的 cursor数据,cursor为空表示查询第一页
Request Example
curl POST 'https://api.relationlabs.ai/api/v1/userChannels/list?keyword=test&limit=10&cursor=110f37661b2c4fcc9a5186954b3b3da6' \
--header 'ApiKey: <ApiKey>' \
--header 'Authorization: bearer ey1JhbGciOiJFUzI1NiJ9.eyJqdGkiOiI0MzdiN2EzZDEwMGY0ODVkOWVhMW1UzZmZlOWE1NmEyZSIsImlzcyI6InJlbGF0aW9ubGFicy5haSIsImlhdCI6MTY2NTIxNTUzNSwic3ViIjoiZGhreXEtc3FhYWEtYWFhYWotc2d6M3EtY2FpIiwiZXhwIjoxNjY1ODIwMzM1fQ.rj7KKuIcgmvaIwZ63YHnXQ4jvvI-eR2Wo7k3YEyz1Muxo8j5ezCowKDpcW0u9zIuHPFqwD0-1XPWdPLR1d1HLFw'
Response Parameters
code
String
返回码
desc
String
返回信息
data
UserChannelResponse
数据
The UserChannelResponse field consists of the following subfields:
cursor
String
用于查询下一页的数据
list
Array[ChannelInfo]
群组的列表
The ChannelInfo field consists of the following subfields:
status
String
群组状态,0-正常状态;1-已离开;2-被管理员移除;3-群组已解散
channelUuid
String
群组uuid
displayName
String
群组名称
channelIcon
String
群组的icon
channelType
String
群组类型
unreadMessageCount
String
未读消息数
mentionsCount
String
被艾特的次数
lastMessageType
String
最后一条消息的类型: TEXT\SYS\CARD
lastMessageContent
String
最后一条消息的内容
lastPostAt
long
最后一条消息的时间戳
mute
boolean
是否开启免打扰,true-开启;false-未开启
pin
boolean
是否置顶,true-置顶;false-未置顶
Response Body
{
"code": "0",
"desc": "success",
"data": {
"cursor": "bbaac023563e4c399228eb6763034965",
"list": [
{
"status": 0,
"channelUuid": "e54d938caa09498fa1a09f7cfe4e21f4",
"displayName": "test-group",
"channelIcon": "",
"channelType": "G",
"unreadMessageCount": 0,
"mentionsCount": 0,
"lastMessageType": "SYS",
"lastMessageContent": "0x1e56 created Group test-group",
"lastPostAt": "1665219499000",
"mute": true,
"pin": true
},
...
]
}
}
Return Code
0
success
接口调用成功
13101
group type error
群组类型无法识别
Last updated