Verifies the webhook signature from the webhook-id, webhook-timestamp and webhook-signature
headers using your webhook signing key, then parses the payload into an event. Fails if the
signature is missing or invalid.
Parameters
Returns
Unwrap
require "anthropic"
anthropic = Anthropic::Client.new(api_key: "my-anthropic-api-key")
# `payload` is the raw body of the incoming webhook request and `headers` are its HTTP headers.
event = anthropic.beta.webhooks.unwrap(payload, headers: headers)
puts(event)