> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Verifier Protocol • AI Agent SDK

> WebhookVerifierProtocol: Protocol for verifying inbound webhook authenticity.

# WebhookVerifierProtocol

> Defined in the [**protocols**](../modules/protocols) module.

<Badge color="blue">AI Agent</Badge>

Protocol for verifying inbound webhook authenticity.

Internet-facing bot adapters (Slack, WhatsApp, Linear, AgentMail, …)
receive webhooks that must be authenticated before they become an agent
run. This protocol declares the contract so the wrapper ingress can
enforce verification centrally and fail-closed: an adapter that declares
`PlatformCapabilities.accepts_webhooks` must expose a verifier and that
verifier must pass before dispatch.

Implementations live in the `praisonai-bot` package (`praisonai_bot.bots`) and
wrap an HMAC comparison over the raw request body.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#8B0000', 'primaryTextColor': '#fff', 'primaryBorderColor': '#710101', 'lineColor': '#189AB4', 'secondaryColor': '#189AB4', 'tertiaryColor': '#fff' }}}%%

graph TD
    event["Event Trigger"] --> hook["Hook: WebhookVerifierProtocol"]
    hook --> decision{"Decision"}
    decision -- "Allow" --> proc["Process"]
    decision -- "Deny" --> block["Block"]
    style hook fill:#189AB4,color:#fff
    style event fill:#8B0000,color:#fff
    style proc fill:#8B0000,color:#fff
    style block fill:#8B0000,color:#fff
```

## Methods

<CardGroup cols={2}>
  <Card title="verify()" icon="function" href="../functions/WebhookVerifierProtocol-verify">
    Return True if the inbound webhook is authentic.
  </Card>
</CardGroup>

## Usage

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
class SlackVerifier:
        def verify(self, *, headers, raw_body):
            ...
```

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/bots/protocols.py#L273">
  `praisonaiagents/bots/protocols.py` at line 273
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Hooks Concept" icon="anchor" href="/docs/docs/concepts/hooks" />

  <Card title="Hook Events" icon="bolt" href="/docs/docs/features/hook-events" />

  <Card title="Callbacks" icon="phone" href="/docs/docs/features/callbacks" />
</CardGroup>
