app.post("/webhook", (req, res) => {
const incomingToken =
req.headers["x-salla-token"] ||
req.headers["authorization"];
const expectedToken = process.env.WEBHOOK_TOKEN;
if (!incomingToken || incomingToken !== expectedToken) {
console.log(" Invalid webhook token");
return res.status(401).json({ error: "Unauthorized" });
}
const event = req.body.event;
const data = req.body.data;
console.log(" Webhook received:", event);
return res.status(200).json({ success: true });
});
https://hook.us2.make.com/lg5njt5zxbqdfgqscy8uhkb251n2gyox
https://lmsat-ai-evff5znj.manus.space/