# Dynamic client registration · details

Clients register at POST /api/oauth/register (RFC 7591). Registration is open, but codes only go to the known apps' published callbacks or to a loopback address.

Checked 2026-12-02 · https://xale.app/docs/ai/dynamic-client-registration-details

## The request

`POST https://xale.app/api/oauth/register`, a JSON object of at most 16 KB.

```json
{
  "client_name": "Example desktop client",
  "redirect_uris": ["http://127.0.0.1:33418/callback"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none"
}
```

| Field | Rule |
| --- | --- |
| `redirect_uris` | Required: 1 to 10, all belonging to one app |
| `grant_types` | Optional; only `authorization_code` and `refresh_token` |
| `response_types` | Optional; only `code` |
| `client_name` | Optional; cleaned to one line of at most 80 characters, and never shown as the app's verified name |

## The answer

`201`:

```json
{
  "client_id": "…",
  "client_id_issued_at": 1796374800,
  "client_name": "Example desktop client",
  "redirect_uris": ["http://127.0.0.1:33418/callback"],
  "grant_types": ["authorization_code", "refresh_token"],
  "response_types": ["code"],
  "token_endpoint_auth_method": "none"
}
```

The `client_id` starts with `xale_cl_`. No secret is issued.

## Accepted callback addresses

| App | Callback |
| --- | --- |
| Claude | `https://claude.ai/api/mcp/auth_callback`, `https://claude.com/api/mcp/auth_callback` |
| ChatGPT | `https://chatgpt.com/connector_platform_oauth_redirect`, `https://chatgpt.com/connector/oauth/{id}` |
| Grok | `https://grok.com/connectors-oauth-exchange-code` or `https://console.x.ai/connectors-oauth-exchange-code`, with or without a trailing slash |
| Google (Gemini) | `https://oauth-redirect.googleusercontent.com/r/…` or `/a/…` (Google's production relay) |
| An app on this computer | `http://127.0.0.1`, `http://localhost` or `http://[::1]`, any port and path |

An `https` callback must have no port and no query. Every address must be written exactly as a URL parser would write it back: no user name or password, no fragment, nothing the parser had to repair.

Google's sandbox and test relays (`oauth-redirect-sandbox.googleusercontent.com`, `oauth-redirect-test.googleusercontent.com`) are dropped from a registration when every other address is Google's production relay. Beside anything else they are refused.

## Refusals

All are `400` JSON with `error` and `error_description`:

| `error` | `error_description` |
| --- | --- |
| `invalid_client_metadata` | “The registration must be JSON.” or “The registration must be a JSON object.” |
| `invalid_redirect_uri` | “Give one to ten redirect_uris.” |
| `invalid_redirect_uri` | “Xale connects to Claude, ChatGPT, Grok and Gemini through their published callback addresses, and to apps on this computer (loopback).” |
| `invalid_redirect_uri` | “All redirect_uris of one registration must belong to the same app.” |
| `invalid_redirect_uri` | “Google's sandbox and test relays are accepted only beside its production relay.” |
| `invalid_client_metadata` | “Only the authorization_code and refresh_token grants are supported.” or “Only the code response type is supported.” |
| `slow_down` (`429`) | “Too many registrations. Try again in an hour.” |

## Limits

| Limit | Value |
| --- | --- |
| A client that never got a token | Removed after 3 days |
| A client nobody has used | Removed after 60 days |

## Related

- For people: [Why can't my AI find Xale?](https://xale.app/help/ai-can-t-find-xale-fixes)
- Read next: [Supported apps · Claude, ChatGPT, Gemini, Grok](https://xale.app/docs/ai/supported-apps-claude-chatgpt-gemini-grok)
- Read next: [Other MCP clients · generic setup](https://xale.app/docs/ai/other-mcp-clients-generic-setup)
- Read next: [OAuth sign-in · how it works](https://xale.app/docs/ai/oauth-sign-in-how-it-works)
