Loading Developer Console...
Cryptographically signed HTTP POST notifications for real-time delivery telemetry and bounces.
No webhook endpoints registered. Add an endpoint to receive delivery and bounce events.
const crypto = require('crypto');
const signature = req.headers['wg-signature'];
const expected = crypto.createHmac('sha256', process.env.WIGOSEND_WEBHOOK_SECRET)
.update(req.rawBody).digest('hex');
if (signature !== expected) throw new Error('Invalid webhook signature');