Skip to main content

功能说明

根据消息id,查询历史消息。

请求说明

请求鉴权:接口需要增加验证 Header,请查看 鉴权说明

请求类型GET

请求限频100次/秒

请求地址:https://请求域名/apigateway/hismsgs/querybymsgids

Content-Typeapplication/json

请求参数

参数数据类型是否必填参数说明
from_idstring单聊会话时,会话一方用户的id
target_idstring单聊会话时,会话另一方用户的id;群聊会话时,群id
channel_typeint会话类型,1:单聊;2:群聊
msg_idstring消息的msg_id

请求示例

GET /apigateway/hismsgs/querybymsgids?from_id=xxx&target_id=xxx&channel_type=1&msg_id=xxx HTTP/1.1
appkey: appkey
signature: 2e639ae3600a4sdff61fb88b76f485b
nonce: nonce
timestamp: 1672568121910
Content-Type: application/json

响应示例

{
"code":0,
"msg":"sucess",
"data":{
"msgs":[
{
"sender_id":"xxx",
"receiver_id":"xxx",
"channel_type":1,
"msg_id":"xxxxx",
"msg_time":1321122121223,
"msg_type":"xxx",
"msg_content":"xxxxxx",
"original_msg_type":"xxx",
"original_msg_content":"xxxxxx"
}
],
"is_finished":false
}
}