Dynamic client registration (RFC 7591)
const url = 'https://api.harperharbor.com/oauth/register';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"client_name":"example","redirect_uris":["https://example.com"],"grant_types":["authorization_code"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.harperharbor.com/oauth/register \ --header 'Content-Type: application/json' \ --data '{ "client_name": "example", "redirect_uris": [ "https://example.com" ], "grant_types": [ "authorization_code" ] }'Registers a public client (no secret; token_endpoint_auth_method is none). client_name: 1-80 characters after whitespace normalization, no control/bidi characters. redirect_uris: at least one; https with a host, http only for localhost/loopback IPs, or a custom scheme with a host or path (javascript, data, file, vbscript are rejected; fragments and userinfo are rejected). grant_types: subset of authorization_code, refresh_token; must include authorization_code; defaults to both when omitted.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Defaults to both.
Responses
Section titled “Responses”Registered client.
object
Prefixed mcp_client_.
["code"].
Example
{ "token_endpoint_auth_method": "none"}invalid_client_metadata or invalid_redirect_uri.
object
OAuth error code.
Only on the internal consent endpoints when the request expired.
Seconds to wait before trying again; only with rate_limited.
Examplegenerated
{ "error": "example", "redirect_url": "example", "retry_after": 1}