Skip to main content

EventToWebHookConfigCreateInput

No description

input EventToWebHookConfigCreateInput {
names: [LocalizedStringInput!]!
trigger: EventTrigger!
code: String
url: String!
signatureSalt: String
basicAuthUsername: String
basicAuthPassword: String
}

Fields

EventToWebHookConfigCreateInput.names ● [LocalizedStringInput!]! non-null input

The display names for the event per language

EventToWebHookConfigCreateInput.trigger ● EventTrigger! non-null enum

The event to trigger the action defined in the event action config

EventToWebHookConfigCreateInput.code ● String scalar

The event code to use when the trigger is [CUSTOM_EVENT]

EventToWebHookConfigCreateInput.url ● String! non-null scalar

The URL of the webhook to send the payload to

EventToWebHookConfigCreateInput.signatureSalt ● String scalar

The salt used to generate HMAC-SHA256 signature for webhook authentication.

When configured, the webhook will include an 'X-Propeller-Signature' header with format 'sha256=<hex_signature>'.

To verify the signature:

  1. JSON stringify the payload
  2. Generate HMAC-SHA256 using this salt and the stringified payload
  3. Compare with the received signature using crypto.timingSafeEqual() to prevent timing attacks

Example (Node.js): const expectedSig = crypto.createHmac('sha256', salt).update(JSON.stringify(payload), 'utf8').digest('hex'); const receivedSig = signature.replace('sha256=', ''); return crypto.timingSafeEqual(Buffer.from(expectedSig, 'hex'), Buffer.from(receivedSig, 'hex'));

EventToWebHookConfigCreateInput.basicAuthUsername ● String scalar

The username for basic HTTP authentication

EventToWebHookConfigCreateInput.basicAuthPassword ● String scalar

The password for basic HTTP authentication

Member Of

eventToWebHookConfigCreate mutation