get_friend_msg_history

get_friend_msg_history只读扩展
获取好友消息历史

Call via POST http://127.0.0.1:3000/get_friend_msg_history (JSON params as the body) or WebSocket.

Parameters

Param Type Required Default Description
user_id uint
message_id int 0
count int 20

Returns (data)

{ messages }:好友消息事件对象数组(每项为 OneBot 消息事件,内部字段不固定)。

Every response is wrapped in the standard envelope: { "status": "ok", "retcode": 0, "data": ... }. The table below describes data.

Field Type Required Description
messages object[] 消息事件对象数组
Raw JSON Schema
{
  "type": "object",
  "properties": {
    "messages": {
      "type": "array",
      "description": "消息事件对象数组",
      "items": {
        "type": "object"
      }
    }
  },
  "required": [
    "messages"
  ]
}

Examples

curl
Python
JavaScript
Go
SnowLuma SDK
curl -X POST http://127.0.0.1:3000/get_friend_msg_history \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <access-token>' \
  -d '{"user_id":10001,"message_id":0,"count":20}'
Using an AI assistant?

MCP-capable clients can discover and call this action directly — no hand-written HTTP. See MCP.