BotSharp/src/Plugins/BotSharp.Plugin.WeChat/README.md

46 lines
952 B
Markdown
Raw Normal View History

2023-07-03 03:09:20 +00:00
# botsharp-plugin-wechat
2018-11-01 15:29:31 +00:00
2023-07-03 03:09:20 +00:00
A channel plugin of BotSharp for Tencent WeChat
2018-11-01 15:29:31 +00:00
### How to run locally
```
2023-07-03 03:09:20 +00:00
git clone https://github.com/SciSharp/BotSharp
2018-11-01 15:29:31 +00:00
```
2023-07-03 03:09:20 +00:00
Check appsettings.json to import module
2018-11-01 15:29:31 +00:00
```
{
2023-07-03 03:09:20 +00:00
"PluginLoader": {
"Assemblies": [
...
"BotSharp.Plugin.WeChat"
],
"Plugins": [
...
"WeChatPlugin"
]
}
2018-11-01 15:29:31 +00:00
}
```
2023-07-03 03:09:20 +00:00
Update appsettings.json to set the corresponding KEY
2018-11-01 15:29:31 +00:00
```
{
2023-07-03 03:09:20 +00:00
"WeChat": {
"AgentId": "437bed34-1169-4833-95ce-c24b8b56154a",
"Token": "#{Token}#",
"EncodingAESKey": "#{EncodingAESKey}#",
"WeixinAppId": "#{WeixinAppId}#",
"WeixinAppSecret": "#{WeixinAppSecret}#"
2018-11-01 15:29:31 +00:00
}
}
```
2023-07-03 03:09:20 +00:00
Update WeChat WebHook form https://mp.weixin.qq.com/ ,set as `https://{HOST}/WeChatAsync`
2018-11-01 15:29:31 +00:00
2023-07-03 03:09:20 +00:00
F5 run WebStarter
2018-11-01 15:29:31 +00:00
2023-07-03 03:09:20 +00:00
Access http://localhost:5500
2018-11-01 15:29:31 +00:00
2023-07-03 03:09:20 +00:00
If you are debugging and developing locally, you can use an intranet penetration tool to receive WeChat message push. It is recommended to use the Dev Tunnels of VS.