Skip to content

TWILIO_WEBHOOK_OPTIONS

const TWILIO_WEBHOOK_OPTIONS: typeof TWILIO_WEBHOOK_OPTIONS;

Defined in: lib/webhook/twilio-webhook.options.ts:85

Metadata key TwilioWebhookGuard reads via Reflector to obtain the options a route was decorated with, and the DI token an application (or the Twilio module) can optionally use to provide the guard’s module-level default TwilioWebhookOptions.

Reusing the same symbol for both purposes is intentional: Nest’s Reflector reads it from handler/class metadata, while Nest’s DI container reads it from the provider registry - the two lookups never collide.

// Supplying a module-level default auth token for TwilioWebhookGuard:
providers: [
{ provide: TWILIO_WEBHOOK_OPTIONS, useValue: { authToken: process.env.TWILIO_AUTH_TOKEN } },
],