When you save your configuration, WeChat will try to send you a GET with an echostr
query string. You must respond to that request with the content of that echostr
value.
Here's an example in Node.js:
express.Router().get('/wechat', function(req, res) {
res.send(req.query.echostr);
}
More information here: http://admin.wechat.com/wiki/index.php?title=Getting_Started
It is also possible that WeChat is just acting up, just keep trying to save until it works if you are sure that your webhook is correctly responding the echostr
.
Obviously, you will need to handle the signature to make it secure and not listen to any requests that isn't coming from WeChat. Your shared token will be used to generate the signature. You must generate the same signature on your side and make sure it matches.
Signature validation is explained in Step 2 of the link mentioned earlier.