/v1/oauth/registerRegister an OAuth client dynamically (RFC 7591)
Public endpoint, rate-limited per source IP. Every client registered here is marked **unverified** and stays that way; the consent screen shows the badge. `client_secret` and `registration_access_token` are returned once and stored only as hashes.
Request body
redirect_uris*arrayExact redirect URIs. Matched byte-for-byte at `/authorize`; the only relaxation is the RFC 8252 §7.3 loopback port. `https` anywhere, `http` on `127.0.0.1` / `[::1]` only, or a reverse-DNS private-use scheme. No wildcards, no fragments.
Example: ["http://127.0.0.1:33418/callback"]
client_name*stringDisplay name shown on the consent screen next to an "unverified" badge. Control characters are stripped; the client cannot supply any other consent-screen copy.
Example: "Claude Desktop"
grant_typesarrayMust include `authorization_code`. `refresh_token` is the only other supported value.
Example: ["authorization_code","refresh_token"]
response_typesarrayOnly `code` is supported.
Example: ["code"]
token_endpoint_auth_methodstring`none` for a public client (PKCE only), or `client_secret_basic` / `client_secret_post` for a confidential client. Defaults to `none`.
Example: "none"
scopestringSpace-delimited ceiling of scopes this client may ever request. Defaults to the full published scope list; the human still approves each one.
Example: "workspace:read mail:read mail:send"
client_uristringAbsolute https homepage for the client.
logo_uristringAbsolute https logo URL. Stored but deliberately never rendered on the consent screen — a client-supplied image is client-supplied display text by another name.
Response · 201
client_id*stringExample: "pcft_cli_2f5c..."
client_id_issued_at*numberUnix seconds at which the client_id was issued.
client_secret_expires_at*number0 — the client secret does not expire on its own.
Example: 0
registration_client_uri*stringEndpoint the registration access token is used against.
redirect_uris*arrayclient_name*stringgrant_types*arrayresponse_types*arraytoken_endpoint_auth_method*stringscope*stringis_verified*booleanAlways false for a dynamically registered client. The consent screen shows this to the human.
Example: false
client_secret*stringReturned exactly once, and only for confidential clients. Stored hashed; it cannot be retrieved again.
registration_access_token*stringBearer token that reads and updates THIS registration and nothing else. Returned once.
Example
Request
POST https://api.platform-auth.productcraft.co/v1/oauth/register
Content-Type: application/json
{
"redirect_uris": [
"http://127.0.0.1:33418/callback"
],
"client_name": "Claude Desktop",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
],
"token_endpoint_auth_method": "none",
"scope": "workspace:read mail:read mail:send",
"client_uri": "string",
"logo_uri": "string"
}Response
{
"client_id": "pcft_cli_2f5c...",
"client_id_issued_at": 0,
"client_secret_expires_at": 0,
"registration_client_uri": "string",
"redirect_uris": [
"string"
],
"client_name": "string",
"grant_types": [
"string"
],
"response_types": [
"string"
],
"token_endpoint_auth_method": "string",
"scope": "string",
"is_verified": false,
"client_secret": "string",
"registration_access_token": "string"
}