api-config.json 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. {
  2. "name": "wechat-check-online",
  3. "displayName": "微信在线状态检查",
  4. "description": "检查微信账号是否在线,返回在线状态。是消息收发和联系人操作的前置检查。",
  5. "category": "wechat",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "{{wechatApiBase}}/login/check-online",
  10. "headers": {
  11. "Content-Type": "application/json"
  12. }
  13. },
  14. "parameters": {
  15. "type": "object",
  16. "required": [],
  17. "properties": {}
  18. },
  19. "requestTransform": {
  20. "description": "无需参数,发送空 body",
  21. "template": {}
  22. },
  23. "response": {
  24. "type": "object",
  25. "properties": {
  26. "ret": {
  27. "type": "integer",
  28. "description": "200 表示请求成功"
  29. },
  30. "msg": {
  31. "type": "string",
  32. "description": "操作结果描述"
  33. },
  34. "data": {
  35. "type": "boolean",
  36. "description": "true=在线, false=离线"
  37. }
  38. }
  39. },
  40. "usageExamples": [
  41. {
  42. "name": "检查微信在线状态",
  43. "input": {},
  44. "description": "检查当前微信是否在线,返回 data=true 表示在线"
  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": {
  56. "maxAttempts": 2,
  57. "delay": 1000,
  58. "backoffMultiplier": 2
  59. }
  60. }