> For the complete documentation index, see [llms.txt](https://link-product.gitbook.io/ngnc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://link-product.gitbook.io/ngnc/integration-guides/bridge-webhooks/implementation.md).

# Implementation

Below is the webhook implementation code for Javascript or Node.Js

<pre class="language-javascript"><code class="lang-javascript"><strong>// Webhook Node.Js Implementaion
</strong><strong>const secret = process.env.BRIDGE_WEBHOOK_SK;
</strong>
function verifyWebhook(req, res, next) {
  if (req.headers["bridge-webhook-secret"] !== secret) {
    console.log("Unauthorized request.");
    return res.status(401).json({
      message: "Unauthorized request.",
    });
  }
  next();
}

app.post("/webhook", verifyWebhook, (req, res) => {
  const webhook = req.body;
  console.log(webhook);

  return res.sendStatus(200);
});
</code></pre>
