JsonWebTokenError: invalid signature

Hi,

I have a little problem with webhooks, I’ve added an App Management service with for event App installed. When I click on the Test button, I get this error: JsonWebTokenError: invalid signature.

This is what I have in my post webhook-callback request:

const jwt = require(“jsonwebtoken”);
app.post(“/webhook-callback”, (req, res ) => {
const data = jwt.verify(req.body, public_key, { algorithms: [“HS256”] });

});

Has anyone ever had this problem before?

Hi,
What are you trying to achieve? If you are trying to make a post request you should use the fetch API, check it out here .