CalCom.Webhook (cal_com v0.3.0)

Copy Markdown

Authenticate and parse versioned Cal.com webhook deliveries.

Summary

Types

t()

An authenticated event with every documented payload field.

Functions

Verify the signature before parsing the provider version and typed payload.

Verify HMAC-SHA256 over the exact raw body bytes.

Types

t()

@type t() :: %CalCom.Webhook{
  event: String.t(),
  value: CalCom.WebhookPayloads.t(),
  version: String.t()
}

An authenticated event with every documented payload field.

Functions

parse(body, headers, opts)

@spec parse(binary(), [{String.t(), String.t()}], keyword()) ::
  {:ok, t()} | {:error, CalCom.Error.t()}

Verify the signature before parsing the provider version and typed payload.

verify(body, headers, opts)

@spec verify(binary(), [{String.t(), String.t()}], keyword()) :: boolean()

Verify HMAC-SHA256 over the exact raw body bytes.