在微信公众号中使用 Chatopera 聊天机器人。
Connect Chatopera Bot to Wechat Public Accout
- Node.js 8+
Open Wechat Public Account Platform 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
.
Creat a bot in Chatopera Bot Service, get clientId
and secret
in details.
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
.