import { WebhookInboundClient } from "@alhwyn/luma";
const webhook = new WebhookInboundClient({
secret: process.env.LUMA_WEBHOOK_SECRET!,
});
const webhook: WebhookInboundClient;
Inbound
WebhookInboundClient constructor
Construct a standalone WebhookInboundClient with new WebhookInboundClient() using only a secret, no API key, for inbound signature checks.
import { WebhookInboundClient } from "@alhwyn/luma";
const webhook = new WebhookInboundClient({
secret: process.env.LUMA_WEBHOOK_SECRET!,
});
const webhook: WebhookInboundClient;
SDK
Or create via the resource factory:
new WebhookInboundClient(options: WebhookInboundClientOptions): WebhookInboundClient
Creates a standalone inbound client without an API key.
import { WebhookInboundClient } from "@alhwyn/luma";
const webhook = new WebhookInboundClient({
secret: process.env.LUMA_WEBHOOK_SECRET!,
});
const webhook: WebhookInboundClient;
Parameters
WebhookInboundClientOptions
required
Test it
const webhook = new WebhookInboundClient({
secret: process.env.LUMA_WEBHOOK_SECRET!,
});
console.log("Inbound client ready");
const webhook = new Luma(process.env.LUMA_API_KEY!).webhooks.client({
secret: process.env.LUMA_WEBHOOK_SECRET!,
});