Skip to content

Register an OAuth client (DCR)

Request

Minimal Dynamic Client Registration (RFC 7591) for MCP hosts and other clients that are not pre-registered. Registration only issues a client_id — access to any data still requires the user login/consent flow and granted scopes.

The body must be application/json (RFC 7591 §3.1): a body of any other type is read as empty and answered with invalid_client_metadata.

Every registered client is public: it receives no client_secret, the response always says token_endpoint_auth_method: none whatever was requested, and the client must use Authorization Code + PKCE. Only client_name and redirect_uris are kept; other RFC 7591 metadata is accepted and ignored. Redirect URIs that are neither absolute HTTPS nor loopback (for example a custom scheme) are dropped from the registration, and the request fails only when none is left. Every registration creates a new client with a new client_id; a client that receives no consent within a day of registration is deleted.

A client_id supplied as an HTTPS URL pointing to a Client ID Metadata Document (CIMD) is accepted at the authorization, token and revocation endpoints without prior registration.

Registration is rate-limited.

Bodyapplication/jsonrequired
client_namestring, [ 1 .. 255 ] charactersrequired

Human-readable OAuth client name shown on the consent screen.

redirect_urisArray of strings, (uri), [ 1 .. 10 ] itemsrequired

Redirect URIs, compared exactly — no wildcards, no subdomain substitution. Two forms are accepted:

  • Absolute HTTPS for web-hosted callbacks: https://app.example.com/oauth/callback.
  • Loopback for native and CLI clients (RFC 8252): http://127.0.0.1/callback, http://[::1]/callback or http://localhost/callback. The port is dynamic — it is chosen at runtime and is ignored when matching, so a client does not have to register every port it may bind. The literal IP is preferred; localhost is accepted because widely used hosts cannot change it. Any other plain-HTTP host is rejected.
grant_typesArray of strings
Default:["authorization_code"]
Items Enum:"authorization_code""refresh_token"
token_endpoint_auth_methodstring

none declares a public client (PKCE only, no secret). A request naming a secret-based method is not refused: the server answers with none, and a registered client never gets a secret (RFC 7591 §3.2.1).

Value:"none"
scopestring

Space-separated scopes requested by the client metadata.

client_uristring, (uri)

Public client home page URI.

logo_uristring, (uri)

Public logo URI for consent UI.

curl -i -X POST \
  https://developer.alteg.io/_mock/en/b2b-v3/openapi/oauth/register \
  -H 'Content-Type: application/json' \
  -d '{
    "client_name": "Example MCP Host",
    "redirect_uris": [
      "https://mcp-host.example.com/oauth/callback",
      "http://127.0.0.1/callback"
    ],
    "grant_types": [
      "authorization_code",
      "refresh_token"
    ],
    "token_endpoint_auth_method": "none"
  }'

Responses

Client registered.

Bodyapplication/json
client_idstringrequired
client_id_issued_atintegerrequired

Unix timestamp of registration.

redirect_urisArray of strings, (uri)required
grant_typesArray of stringsrequired
Items Enum:"authorization_code""refresh_token"
token_endpoint_auth_methodstringrequired
Value:"none"
client_namestring
Response
{ "client_id": "ag_client_9c41a7d3b2", "client_id_issued_at": 1784900000, "client_name": "Example MCP Host", "redirect_uris": [ "https://mcp-host.example.com/oauth/callback", "http://127.0.0.1/callback" ], "grant_types": [ "authorization_code", "refresh_token" ], "token_endpoint_auth_method": "none" }