mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-20 05:27:59 +08:00
docs(wechatcom_kf): add web console onboarding tab
This commit is contained in:
@@ -45,30 +45,41 @@ description: 将 CowAgent 接入微信客服(WeCom Customer Service)
|
||||
|
||||
## 三、配置和运行
|
||||
|
||||
在 `config.json` 中添加以下配置(各参数与企业微信后台的对应关系见上方截图):
|
||||
填入上一步收集到的 4 个字段(Corp ID / Secret / Token / EncodingAESKey):
|
||||
|
||||
```json
|
||||
{
|
||||
"channel_type": "wechatcom_kf",
|
||||
"wechatcom_corp_id": "YOUR_CORP_ID",
|
||||
"wechatcom_kf_secret": "YOUR_SECRET",
|
||||
"wechatcom_kf_token": "YOUR_TOKEN",
|
||||
"wechatcom_kf_aes_key": "YOUR_AES_KEY",
|
||||
"wechatcom_kf_port": 9888
|
||||
}
|
||||
```
|
||||
<Tabs>
|
||||
<Tab title="Web 控制台">
|
||||
启动 Cow 项目后打开 Web 控制台,选择 **通道** 菜单,点击 **接入通道**,选择 **微信客服**,依次填入 Corp ID / Secret / Token / AES Key(端口默认 9888,可改),点击接入即可。
|
||||
|
||||
| 参数 | 说明 |
|
||||
| --- | --- |
|
||||
| `wechatcom_corp_id` | 企业 ID |
|
||||
| `wechatcom_kf_secret` | 绑定到微信客服的那个企微自建应用的 Secret |
|
||||
| `wechatcom_kf_token` | API 接收配置中的 Token |
|
||||
| `wechatcom_kf_aes_key` | API 接收配置中的 EncodingAESKey |
|
||||
| `wechatcom_kf_port` | 监听端口,默认 9888 |
|
||||
<img src="https://cdn.link-ai.tech/doc/cow-weixinkefu-web-control.png" width="800"/>
|
||||
</Tab>
|
||||
<Tab title="配置文件">
|
||||
在 `config.json` 中添加以下配置(各参数与企业微信后台的对应关系见上方截图):
|
||||
|
||||
配置完成后启动程序。当日志中出现 `Listening on http://0.0.0.0:9888/wxkf/` 时,说明程序运行成功,需要将该端口对外开放(如在云服务器安全组中放行)。
|
||||
```json
|
||||
{
|
||||
"channel_type": "wechatcom_kf",
|
||||
"wechatcom_corp_id": "YOUR_CORP_ID",
|
||||
"wechatcom_kf_secret": "YOUR_SECRET",
|
||||
"wechatcom_kf_token": "YOUR_TOKEN",
|
||||
"wechatcom_kf_aes_key": "YOUR_AES_KEY",
|
||||
"wechatcom_kf_port": 9888
|
||||
}
|
||||
```
|
||||
|
||||
程序启动后,回到企业微信「接收消息 → 设置API接收」,将回调 URL 填为 `http://<your-host>:9888/wxkf/`,点击保存。保存成功后还需将服务器 IP 添加到 **企业可信IP** 中,否则无法收发消息:
|
||||
| 参数 | 说明 |
|
||||
| --- | --- |
|
||||
| `wechatcom_corp_id` | 企业 ID |
|
||||
| `wechatcom_kf_secret` | 绑定到微信客服的那个企微自建应用的 Secret |
|
||||
| `wechatcom_kf_token` | API 接收配置中的 Token |
|
||||
| `wechatcom_kf_aes_key` | API 接收配置中的 EncodingAESKey |
|
||||
| `wechatcom_kf_port` | 监听端口,默认 9888 |
|
||||
</Tab>
|
||||
</Tabs>
|
||||
|
||||
接入完成后启动程序(Web 控制台方式会自动重启),日志中出现 `Listening on http://0.0.0.0:9888/wxkf/` 表示运行成功,需要将该端口对外开放(如在云服务器安全组中放行)。
|
||||
|
||||
接着回到企业微信「接收消息 → 设置API接收」,将回调 URL 填为 `http://<your-host>:9888/wxkf/`,点击保存。保存成功后还需将服务器 IP 添加到 **企业可信IP** 中,否则无法收发消息:
|
||||
|
||||
<img src="https://cdn.link-ai.tech/doc/wechat-com_config.png" width="600"/>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user