611 B
611 B
QQ机器人 Webhook 对接示例
本项目演示如何用 Node.js 搭建 HTTPS Webhook 服务对接 QQ 机器人开放平台事件。
使用方法
- 安装依赖:
npm install - 生成自签名证书(开发用):
mkdir cert openssl req -nodes -new -x509 -keyout cert/key.pem -out cert/cert.pem - 启动服务:
npm start - 在QQ机器人开放平台配置 Webhook 回调地址(如 https://你的服务器:8999/webhook)
注意事项
- 生产环境请使用正规CA证书。
- 签名校验请参考官方文档实现。