Skip to main content

Overview

Queries message history by message ID.

Request

Authentication: Add authentication headers to the request. See Authentication.

Method GET

Rate limit 100 requests/second

Endpoint https://API domain/apigateway/hismsgs/querybymsgids

Content-Type application/json

Request Parameters

ParameterData TypeRequiredDescription
from_idstringNoFor a private chat, the ID of one participant. Maximum length: 32 characters.
target_idstringYesFor a private chat, the ID of the other participant; for a group chat, the group ID. Maximum length: 32 characters.
channel_typeintYesConversation type. 1: private chat; 2: group chat.
msg_idstringYesMessage ID. Maximum length: 20 characters.

Request Example

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

Response Example

{
"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
}
}