# ZeroBounce auth.md

You are an agent. This document tells you how to get credentials for the ZeroBounce API and the hosted ZeroBounce MCP server, and how to use them. ZeroBounce member sign-in is issued by https://okta.zerobounce.net/oauth2/aus59q4ffwAfaJK5Q4x7; this website does not issue tokens.

Two methods are supported:

- **Method A: OAuth with dynamic client registration** for the hosted MCP server at https://mcp.zerobounce.net/mcp.
- **Method B: API key** for the ZeroBounce API at https://api.zerobounce.net/v2/.

## agent_auth

```json
{
  "agent_auth": {
    "skill": "https://www.zerobounce.net/auth.md",
    "register_uri": "https://www.zerobounce.net/members/signin/register",
    "claim_uri": "https://www.zerobounce.net/members/signin/register",
    "identity_types_supported": [
      "anonymous"
    ],
    "anonymous": {
      "credential_types_supported": [
        "api_key"
      ]
    }
  }
}
```

## Method A: OAuth (hosted MCP server)

The MCP server uses Streamable HTTP and requires an OAuth access token.

### Step 1: Discover

```http
GET https://mcp.zerobounce.net/.well-known/oauth-protected-resource/mcp
GET https://mcp.zerobounce.net/.well-known/oauth-authorization-server
```

The authorization server is https://mcp.zerobounce.net. It supports the authorization code grant with PKCE (S256) and public clients (`token_endpoint_auth_method: none`). Scopes are `mcp:read`, `mcp:credits`, `mcp:write`, `mcp:warmup` and `offline_access`; `scopes_supported` in the metadata is the current list.

### Step 2: Register a client

```http
POST https://mcp.zerobounce.net/register
Content-Type: application/json

{
  "client_name": "<your agent name>",
  "redirect_uris": ["<your callback URL>"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none"
}
```

Keep the `client_id` from the response.

### Step 3: Authorize

Send the person you act for to:

```http
GET https://mcp.zerobounce.net/authorize?response_type=code&client_id=<client_id>&redirect_uri=<your callback URL>&scope=<space-separated scopes>&code_challenge=<S256 challenge>&code_challenge_method=S256&resource=https://mcp.zerobounce.net/mcp
```

They sign in to ZeroBounce on the page that opens and approve access. If they have no account, they create one at https://www.zerobounce.net/members/signin/register first.

### Step 4: Get a token

```http
POST https://mcp.zerobounce.net/token
Content-Type: application/x-www-form-urlencoded

grant_type=authorization_code&code=<code>&redirect_uri=<your callback URL>&client_id=<client_id>&code_verifier=<verifier>
```

### Step 5: Call the MCP server

```http
POST https://mcp.zerobounce.net/mcp
Authorization: Bearer <access_token>
```

Use the refresh token at https://mcp.zerobounce.net/token when the access token expires. On a 401, start again at Step 1.

Docs: https://www.zerobounce.net/docs/api-integrations/zerobounce-mcp-server

## Method B: API key (ZeroBounce API)

1. Register: the person you act for opens https://www.zerobounce.net/members/signin/register and creates a ZeroBounce account. The account is theirs from the start, so there is no separate claim step.
2. Get the credential: they create an API key in the members dashboard and give it to you.
3. Use the credential: send the key as the `api_key` parameter on every request.

```http
GET https://api.zerobounce.net/v2/validate?api_key=<api_key>&email=someone@example.com
```

Treat the key like a password. Do not log it or commit it.

Docs: https://www.zerobounce.net/docs/email-validation-api-quickstart

## Discovery

- Protected resource (this site): https://www.zerobounce.net/.well-known/oauth-protected-resource
- OpenID configuration: https://okta.zerobounce.net/oauth2/aus59q4ffwAfaJK5Q4x7/.well-known/openid-configuration
- Authorization server: https://okta.zerobounce.net/.well-known/oauth-authorization-server/oauth2/aus59q4ffwAfaJK5Q4x7
- MCP server card: https://www.zerobounce.net/.well-known/mcp/server-card.json
- MCP protected resource: https://mcp.zerobounce.net/.well-known/oauth-protected-resource/mcp
