Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.linkio.world/llms.txt

Use this file to discover all available pages before exploring further.

For example, when an event occurs, we will send the event object as JSON in the request body of the POST request. Below is an example of webhook implementation code for Javascript or Node.Js:
// Webhook Node.Js Implementaion
const secret = process.env.BRIDGE_WEBHOOK_SK;

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

Setup Event