Unwrap
Function
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
<?php
require_once dirname(__DIR__) . '/vendor/autoload.php';
use Anthropic\Client;
$client = new Client(apiKey: 'my-anthropic-api-key');
// $body is the raw body of the incoming webhook request and $headers are its HTTP headers.
$event = $client->beta->webhooks->unwrap($body, $headers);
var_dump($event);