api-config.json 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "name": "wechat-get-conversations",
  3. "displayName": "获取微信会话列表",
  4. "description": "获取按联系人分组的会话列表,含最近消息摘要,用于发现活跃对话。",
  5. "category": "wechat",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "GET",
  9. "url": "{{wechatApiBase}}/conversations",
  10. "headers": {}
  11. },
  12. "parameters": {
  13. "type": "object",
  14. "required": [],
  15. "properties": {}
  16. },
  17. "requestTransform": {
  18. "description": "无需参数"
  19. },
  20. "response": {
  21. "type": "object",
  22. "properties": {
  23. "ret": { "type": "integer", "description": "200表示成功" },
  24. "data": {
  25. "type": "array",
  26. "items": {
  27. "type": "object",
  28. "properties": {
  29. "wxid": { "type": "string", "description": "联系人wxid" },
  30. "nickName": { "type": "string", "description": "联系人昵称" },
  31. "lastMessage": { "type": "string", "description": "最近消息摘要" },
  32. "lastTime": { "type": "string", "description": "最近消息时间ISO" },
  33. "lastType": { "type": "string", "description": "最近消息类型" },
  34. "direction": { "type": "string", "description": "最近消息方向" }
  35. }
  36. }
  37. }
  38. }
  39. },
  40. "usageExamples": [
  41. {
  42. "name": "查看所有活跃会话",
  43. "input": {},
  44. "description": "获取当前所有有消息记录的会话"
  45. }
  46. ],
  47. "tokenConfig": {
  48. "type": "config",
  49. "configFile": "~/.openclaw/wechat-credentials.json",
  50. "tokenField": "wechatApiBase",
  51. "currentToken": "http://8.138.37.248/api/wechat-agent",
  52. "resolutionOrder": ["configFile", "currentToken"]
  53. },
  54. "timeout": 10000,
  55. "retry": { "maxAttempts": 2, "delay": 1000, "backoffMultiplier": 2 }
  56. }