# BB-402

Gate any API behind on-chain token ownership using the standard HTTP 402 status code. Built for AI agents, bots, and any programmatic client that needs to authenticate and pay for services.

## Pages

| Page                                                               | Description                                                                     |
| ------------------------------------------------------------------ | ------------------------------------------------------------------------------- |
| [Overview](/token-standard/bb-402/overview.md)                     | How it works, why it matters, quickstart code                                   |
| [Full Specification](/token-standard/bb-402/spec.md)               | Complete protocol spec, security considerations, x402 comparison                |
| [Code Snippets](/token-standard/bb-402/middleware-recipes.md)      | Server-side verification snippets: signatures, ownership checks, nonces         |
| [Collection Recipes](/token-standard/bb-402/collection-recipes.md) | How to configure collections for auth patterns: soulbound, revocable, 2FA, bans |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bitbadges.io/token-standard/bb-402.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
