curl -X GET "http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123"
const response = await fetch('http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123');
const data = await response.json();
console.log(data);
import requests
params = {
'channel_id': 'group123',
'channel_type': 2
}
response = requests.get('http://localhost:5001/channel/max_message_seq', params=params)
data = response.json()
print(data)
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123")
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"message_seq": 1500
}
{
"message_seq": 0
}
消息管理
获取频道最大消息序号
获取指定频道的最大消息序号
GET
/
channel
/
max_message_seq
curl -X GET "http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123"
const response = await fetch('http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123');
const data = await response.json();
console.log(data);
import requests
params = {
'channel_id': 'group123',
'channel_type': 2
}
response = requests.get('http://localhost:5001/channel/max_message_seq', params=params)
data = response.json()
print(data)
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123")
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"message_seq": 1500
}
{
"message_seq": 0
}
概述
获取指定频道的最大消息序号,用于消息同步和状态检查。查询参数
string
必填
频道 ID
integer
必填
频道类型 (1=个人频道, 2=群组频道)
string
必填
当前登录用户 ID
curl -X GET "http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123"
const response = await fetch('http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123');
const data = await response.json();
console.log(data);
import requests
params = {
'channel_id': 'group123',
'channel_type': 2
}
response = requests.get('http://localhost:5001/channel/max_message_seq', params=params)
data = response.json()
print(data)
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, err := http.Get("http://localhost:5001/channel/max_message_seq?channel_id=group123&channel_type=2&login_uid=user123")
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("%+v\n", result)
}
{
"message_seq": 1500
}
{
"message_seq": 0
}
响应字段
integer
必填
频道的最大消息序号,如果频道不存在或没有消息则返回 0
状态码
| 状态码 | 说明 |
|---|---|
| 200 | 成功获取最大消息序号 |
| 400 | 请求参数错误 |
| 500 | 服务器内部错误 |
⌘I

