https://github.com/chatopera/chatopera-gzh-sample
在微信公众号中使用 Chatopera 聊天机器人
https://github.com/chatopera/chatopera-gzh-sample
chatbot wechat wechat-bot
Last synced: 3 months ago
JSON representation
在微信公众号中使用 Chatopera 聊天机器人
- Host: GitHub
- URL: https://github.com/chatopera/chatopera-gzh-sample
- Owner: chatopera
- Created: 2019-07-15T02:23:42.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-15T03:16:26.000Z (almost 7 years ago)
- Last Synced: 2024-04-14T20:20:43.182Z (about 2 years ago)
- Topics: chatbot, wechat, wechat-bot
- Language: JavaScript
- Homepage: https://bot.chatopera.com/
- Size: 4.88 KB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chatopera-gzh-sample
在微信公众号中使用 Chatopera 聊天机器人。
Connect Chatopera Bot to Wechat Public Accout
## Requirements
- Node.js 8+
## Settings
### Wechat Account
Open [Wechat Public Account Platform](https://mp.weixin.qq.com/) from browser and login, enable developer mode, get `appId`, `token` and `key`.

Fill in the Service Url with your application's URL, such as `https://wgh.xxx.com/wechat`.
### Create Bot
Creat a bot in [Chatopera Bot Service](https://bot.chatopera.com/), get `clientId` and `secret` in [details](https://github.com/chatopera/chatopera-sample-node#%E8%8E%B7%E5%8F%96clientid%E5%92%8Csecret).
### Configure
Get this demo application source code with git.
```
git clone https://github.com/chatopera/chatopera-gzh-sample.git
```
Modify environment variables in `admin/start.sh`.
| KEY | VALUE |
| ------------------- | ------------------------------ |
| SUPERBRAIN_CLIENTID | clientId of Chatopera Bot |
| SUPERBRAIN_SECRET | secret of Chatopera Bot |
| WECHAT_GZH_APPID | 微信公众号开发者 ID |
| WECHAT_GZH_TOKEN | 微信公众号令牌 |
| WECHAT_GZH_KEY | 消息加解密密钥(EncodingAESKey) |
Start your application with `admin/start.sh`.
### Enable ASR in Wechat
[微信公众平台怎样开启接收语音识别结果](https://jingyan.baidu.com/article/b7001fe1adc5dc0e7382dd6f.html)