api-config.json 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. {
  2. "name": "wechat-get-contact-detail",
  3. "displayName": "获取联系人详细信息",
  4. "description": "根据wxid批量获取联系人详细信息,含昵称、头像、签名、地区等。",
  5. "category": "wechat",
  6. "version": "1.0.0",
  7. "endpoint": {
  8. "method": "POST",
  9. "url": "{{wechatApiBase}}/contacts/detail",
  10. "headers": { "Content-Type": "application/json" }
  11. },
  12. "parameters": {
  13. "type": "object",
  14. "required": ["wxids"],
  15. "properties": {
  16. "wxids": {
  17. "type": "array",
  18. "items": { "type": "string" },
  19. "description": "wxid数组,支持批量查询"
  20. }
  21. }
  22. },
  23. "requestTransform": {
  24. "template": { "wxids": "{{wxids}}" }
  25. },
  26. "response": {
  27. "type": "object",
  28. "properties": {
  29. "ret": { "type": "integer" },
  30. "data": {
  31. "type": "array",
  32. "items": {
  33. "type": "object",
  34. "properties": {
  35. "userName": { "type": "string", "description": "wxid" },
  36. "nickName": { "type": "string", "description": "昵称" },
  37. "sex": { "type": "integer", "description": "1=男 2=女" },
  38. "signature": { "type": "string" },
  39. "province": { "type": "string" },
  40. "city": { "type": "string" },
  41. "bigHeadImgUrl": { "type": "string", "description": "头像URL" },
  42. "alias": { "type": "string", "description": "微信号" }
  43. }
  44. }
  45. }
  46. }
  47. },
  48. "tokenConfig": {
  49. "type": "config",
  50. "configFile": "~/.openclaw/wechat-credentials.json",
  51. "tokenField": "wechatApiBase",
  52. "currentToken": "http://8.138.37.248/api/wechat-agent",
  53. "resolutionOrder": ["configFile", "currentToken"]
  54. },
  55. "timeout": 15000
  56. }