Skip to main content

Hi,


We submitted the App in the marketplace .


To know about the details of App installation and uninstallation, we are utilizing webhook events, and we have written the following code according to the documentation. However, we are encountering errors in the code such as


JsonWebTokenError: invalid signature

at C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\jsonwebtoken\\verify.js:171:19

at getSecret (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\jsonwebtoken\\verify.js:97:14)

at module.exports [as verify] (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\jsonwebtoken\\verify.js:101:10)

at C:\\Users\\priya\\Downloads\\monday.com webhook\\server.js:11:26

at Layer.handle [as handle_request] (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\layer.js:95:5)

at next (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\route.js:144:13)

at Route.dispatch (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\route.js:114:3)

at Layer.handle [as handle_request] (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\layer.js:95:5)

at C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\index.js:284:15

at Function.process_params (C:\\Users\\priya\\Downloads\\monday.com webhook\\node_modules\\express\\lib\\router\\index.js:346:12)


Sample Code for your reference:


app.post("/action", function(req, res) {
res.status(200).send({})
const token = req.headers.authorization;
const decoded = jwt.verify(token, “MY_SIGNING_SECRET”);
const subscription = decoded.subscription;
})

Hi,

May I have an update on this?


Thanks!

Priya


Hello there @Priya,


Please send your full script and the full error you get in this form and our team will take a look into it!


Cheers,

Matias


I did find the answer for those in the future: Authed Lifecycle webhooks are verified with the CLIENT_SECRET and authed webhooks created by mutations are signed by the SIGNING_SECRET


What did the resolution end up being? I am seeing the same issue


Reply