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
package com.anthropic.example;
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.core.UnwrapWebhookParams;
import com.anthropic.models.beta.webhooks.UnwrapWebhookEvent;
public final class Main {
private Main() {}
public static void main(String[] args) {
AnthropicClient client = AnthropicOkHttpClient.fromEnv();
// `body` is the raw body of the incoming webhook request and `headers` are its HTTP headers as a `Headers` (`Headers.builder().put(name, value).build()`).
UnwrapWebhookParams params = UnwrapWebhookParams.builder()
.body(body)
.headers(headers)
.build();
UnwrapWebhookEvent event = client.beta().webhooks().unwrap(params);
}
}