Skip to main content

Facing error in code - App life cycle events (webhook events)

  • February 9, 2024
  • 4 replies
  • 273 views

  • Participating Frequently

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;
})

4 replies

  • Author
  • Participating Frequently
  • February 12, 2024

Hi,
May I have an update on this?

Thanks!
Priya


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • February 14, 2024

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


  • New Participant
  • January 26, 2025

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


  • New Participant
  • January 26, 2025

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