Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.get('/webhook', function(req, res) {
- if (req.query['hub.mode'] === 'subscribe' &&
- req.query['hub.verify_token'] === thisTokenIsShit1233) {
- console.log("Validating webhook");
- res.status(200).send(req.query['hub.challenge']);
- } else {
- console.error("Failed validation. Make sure the validation tokens match.");
- res.sendStatus(403);
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment