> Documentation index: https://docs.zernio.com/llms.txt. Every page is also Markdown: add .md to its URL.

# Register an OAuth client API Reference

Open dynamic client registration (RFC 7591): no API key and no approval step. Register once per app (or per install for native and MCP clients) and keep the `client_id`.

- `redirect_uris`: 1 to 10. https URIs, http loopback (`http://127.0.0.1`, `http://[::1]`, `http://localhost`, any port) and private-use app schemes (`myapp://callback`) are accepted. No fragments or embedded credentials. At `/oauth/authorize` the `redirect_uri` must match one exactly, except the port of a loopback URI.
- `token_endpoint_auth_method`: `none` (public client, the default), `client_secret_post` or `client_secret_basic` (confidential). PKCE is required for every client either way.
- `scope`: what the client may request, from the scopes of the `oauth2` security scheme. Omit it to allow every resource scope (`email` must be named).
- `logo_uri`: shown on the consent screen. Kept only when it is a public https URL on the same registrable domain as every non-loopback redirect URI; otherwise dropped without an error.
- There is no endpoint to update or delete a client: register a new one.
- Limited to 5 registrations a minute per IP address.


## POST /oauth/register

**Register an OAuth client**

Open dynamic client registration (RFC 7591): no API key and no approval step. Register once per app (or per install for native and MCP clients) and keep the `client_id`.

- `redirect_uris`: 1 to 10. https URIs, http loopback (`http://127.0.0.1`, `http://[::1]`, `http://localhost`, any port) and private-use app schemes (`myapp://callback`) are accepted. No fragments or embedded credentials. At `/oauth/authorize` the `redirect_uri` must match one exactly, except the port of a loopback URI.
- `token_endpoint_auth_method`: `none` (public client, the default), `client_secret_post` or `client_secret_basic` (confidential). PKCE is required for every client either way.
- `scope`: what the client may request, from the scopes of the `oauth2` security scheme. Omit it to allow every resource scope (`email` must be named).
- `logo_uri`: shown on the consent screen. Kept only when it is a public https URL on the same registrable domain as every non-loopback redirect URI; otherwise dropped without an error.
- There is no endpoint to update or delete a client: register a new one.
- Limited to 5 registrations a minute per IP address.


### Request Body

- **client_name** (required) `string`: Shown on the consent screen and in Connected apps. Cut to 200 characters.
- **redirect_uris** (required) `array`: No description
- **token_endpoint_auth_method** `string`: No description - one of: none, client_secret_post, client_secret_basic
- **grant_types** `array`: Unknown values are ignored. Default [authorization_code]; refresh works either way.
- **response_types** `array`: No description
- **scope** `string`: Space-separated scopes. Unknown scopes are refused.
- **logo_uri** `string`: No description

### Responses

#### 201: Registered. Store `client_secret` now; it is not shown again.

**Response Body:**

- **client_id** (required) `string`: Starts with late_cid_.
- **client_name** (required) `string`: No description
- **client_secret** (required) `string`: Shown once. Enforced at the token and revocation endpoints when token_endpoint_auth_method is client_secret_post or client_secret_basic. For a public client (none) it is returned for compatibility and never checked: do not rely on it.
- **client_id_issued_at** (required) `integer`: Unix seconds.
- **client_secret_expires_at** (required) `integer`: 0 (never expires).
- **redirect_uris** (required) `array[string]`: 
- **grant_types** (required) `array[string]`: 
- **response_types** (required) `array[string]`: 
- **token_endpoint_auth_method** (required) `string`: No description - one of: none, client_secret_post, client_secret_basic
- **scope** (required) `string`: Space-separated scopes the client may request.
- **logo_uri** `string` (uri): Present when the logo was kept (see the request field).

#### 400: `invalid_client_metadata` (missing client_name, unknown scope or auth method, body not JSON) or `invalid_redirect_uri`.

**Response Body:**

- **error** (required) `string`: invalid_request, invalid_client, invalid_grant, invalid_scope, invalid_target, unsupported_grant_type, invalid_client_metadata, invalid_redirect_uri, invalid_token, too_many_requests or server_error.
- **error_description** `string`: Human-readable detail.

#### 429: More than 5 registrations a minute from this IP address. Wait for `Retry-After` seconds.

**Response Body:**

- **error** (required) `string`: invalid_request, invalid_client, invalid_grant, invalid_scope, invalid_target, unsupported_grant_type, invalid_client_metadata, invalid_redirect_uri, invalid_token, too_many_requests or server_error.
- **error_description** `string`: Human-readable detail.

---


# Related Schema Definitions

## OAuthClientRegistration

### Properties

- **client_id** (required) `string`: Starts with late_cid_.
- **client_name** (required) `string`: No description
- **client_secret** (required) `string`: Shown once. Enforced at the token and revocation endpoints when token_endpoint_auth_method is client_secret_post or client_secret_basic. For a public client (none) it is returned for compatibility and never checked: do not rely on it.
- **client_id_issued_at** (required) `integer`: Unix seconds.
- **client_secret_expires_at** (required) `integer`: 0 (never expires).
- **redirect_uris** (required) `array`: No description
- **grant_types** (required) `array`: No description
- **response_types** (required) `array`: No description
- **token_endpoint_auth_method** (required) `string`: No description - one of: none, client_secret_post, client_secret_basic
- **scope** (required) `string`: Space-separated scopes the client may request.
- **logo_uri** `string`: Present when the logo was kept (see the request field).

## OAuthError

Error body of the OAuth endpoints (RFC 6749 section 5.2).

### Properties

- **error** (required) `string`: invalid_request, invalid_client, invalid_grant, invalid_scope, invalid_target, unsupported_grant_type, invalid_client_metadata, invalid_redirect_uri, invalid_token, too_many_requests or server_error.
- **error_description** `string`: Human-readable detail.