Platform API reference

Platform API · Oauth-Authorization-Server

post/v1/oauth/register

Register 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*array

Exact 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*string

Display 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_typesarray

Must include `authorization_code`. `refresh_token` is the only other supported value.

Example: ["authorization_code","refresh_token"]

response_typesarray

Only `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"

scopestring

Space-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_uristring

Absolute https homepage for the client.

logo_uristring

Absolute 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*string

Example: "pcft_cli_2f5c..."

client_id_issued_at*number

Unix seconds at which the client_id was issued.

client_secret_expires_at*number

0 — the client secret does not expire on its own.

Example: 0

registration_client_uri*string

Endpoint the registration access token is used against.

redirect_uris*array
client_name*string
grant_types*array
response_types*array
token_endpoint_auth_method*string
scope*string
is_verified*boolean

Always false for a dynamically registered client. The consent screen shows this to the human.

Example: false

client_secret*string

Returned exactly once, and only for confidential clients. Stored hashed; it cannot be retrieved again.

registration_access_token*string

Bearer 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"
}