name: wechat-get-conversations
按联系人分组返回所有有过消息记录的会话,每条含最近一条消息摘要。适合"最近谁找过我"这类概览问题。
用 exec/bash 工具执行:
API_BASE=$(node -e "console.log(JSON.parse(require('fs').readFileSync(require('path').join(require('os').homedir(),'.openclaw','wechat-credentials.json'),'utf8')).wechatApiBase)")
curl -s --max-time 10 -X GET "$API_BASE/conversations"
{
"ret": 200,
"data": [
{
"wxid": "wxid_abc123",
"nickName": "张三",
"lastMessage": "明天能开会吗",
"lastTime": "2026-04-17T09:30:00.000Z",
"lastType": "text",
"direction": "received"
}
]
}
data[].wxid 调 wechat-get-messages 传 wxid=xxxdata[].wxid 调 wechat-send-textwechat-get-contact-list 拿