Skip to content

微信客服配置

yaml
wecom-kf.customer_service:
  corp_id: ww1234567890abcdef
  corp_secret: your_wecom_customer_service_secret
  token: your_callback_token
  encoding_aes_key: your_43_character_key
  open_kfid: wkxxxxxxxxxxxxxxxx
  webhook_path: /wecom-kf/customer_service/webhook
  cursor_store_path: ./data/wecom-kf-cursor.json
  deduplicate_messages: true
  message_deduplication_limit: 10000
  enable_sync_poll: false
  sync_poll_interval_ms: 30000
  api_base_url: https://qyapi.weixin.qq.com
字段必填默认值说明
corp_id-企业 ID 与回调 receiveid 校验值
corp_secret-微信客服 API Secret
token-回调签名 Token
encoding_aes_key-43 位回调加解密密钥
open_kfid-没有已知会话上下文时使用的默认客服账号
webhook_path/wecom-kf/{account_id}/webhook主 HTTP Host 上的回调路径
cursor_store_path仅内存各客服账号的 sync_msg 游标文件
deduplicate_messagestruemsgid 过滤重投消息
message_deduplication_limit10000进程内去重集合上限
enable_sync_pollfalse启用无回调 Token 的补偿同步
sync_poll_interval_ms30000补偿同步间隔,最小 5000ms
api_base_url官方地址官方兼容 HTTPS 代理或测试入口

本适配器不再读取 agent_id,也不接受旧的明文/JSON 回调兼容格式。

首次凭证请求、补偿同步和后续协议出口共用 OneBots 全局 timeout。启动超时、人工停止或配置热重载取消账号时,适配器会中止尚未完成的 API 请求并清理轮询;账号就绪后仍保留启动信号,因此协议启动失败也会完整回滚微信客服生命周期。