qq-robot-sign
v1.0.2
Published
用于QQ机器人的webhook回调签名验证
Downloads
193
Maintainers
Readme
QQ-ROBOT-SIGN
QQ 机器人签名算法
安装
npm install qq-robot-sign
使用
const { sign } = require("qq-robot-sign");
const clientSecret = "xxxxxx";
router.post("/webhook", async (req, res) => {
const body = req.body;
if (body.op === 13) {
const result = sign({
event_ts: body.d.event_ts,
plain_token: body.d.plain_token,
clientSecret,
});
return res.send(result);
}
});