你可以使用此接口查询会话中所有成员的已读位置。
你可以调用GetParticipantReadIndex接口,指定你所属的AppId和会话 ID 查询会话中所有成员的已读位置。
关于调用接口的服务地址、通信协议、字符编码和签名机制,参看调用 OpenAPI。
QPS 不得超过 100。
使用 POST 方式发起请求。
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | GetParticipantReadIndex | 接口名称,本接口取值:GetParticipantReadIndex |
| Version | String | 是 | 2020-12-01 | 接口版本,本接口取值:2020-12-01 |
| 参数名 | 类型 | 必填 | 示例值 | 描述 |
|---|---|---|---|---|
| AppId | Int | 是 | 000000 | 应用的唯一标志 |
| ConversationShortId | Int | 是 | 000001 | 会话 ID |
https://rtc.volcengineapi.com?Action=GetParticipantReadIndex&Version=2020-12-01
postscript{
"AppId":000000,
"ConversationShortId":000001
}
json返回结果参看 BaseResponse。
其中 Result 的结构如下:
| 参数名 | 类型 | 描述 |
|---|---|---|
| ReadIndexes | Array of ReadIndex | 会话成员信息 |
| 参数名 | 类型 | 描述 |
|---|---|---|
| ParticipantUserId | Int | 会话成员 UserId |
| ReadIndex | Int | 成员已读位置。若没有返回某个成员的 ReadIndex,则表示该成员的 ReadIndex 为 0。 |
{
"ResponseMetadata": {
"RequestId": "Your_RequestId",
"Action": "GetParticipantReadIndex",
"Version": "2020-12-01",
"Service": "rtc",
"Region": "cn-north-1"
},
"Result": {
"ReadIndexes": [
{
"ParticipantUserId": 10002,
"ReadIndex": 1669712044879723
},
{
"ParticipantUserId": 10003,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10007,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10008,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10010,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10001,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10004,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10005,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10006,
"ReadIndex": 1669712042935297
},
{
"ParticipantUserId": 10009,
"ReadIndex": 1669712042935297
}
]
}
}
json