OAuth
Describe an in-flight OAuth login request for the console login screen
The Hydra login_challenge from the authorize redirect.
The OAuth client requesting access (self-declared metadata — show, never trust).
The OAuth scopes the client asked for (informational — authority comes from consent).
curl https://api.koo.io/oauth/login-request?challenge=example \ -H "Authorization: Bearer kc_your_api_token"{ "client": { "clientId": "client_01example0000000000000000x", "clientName": "example", "clientUri": "example", "logoUri": "example" }, "requestedScope": [ "example" ]}Accept an OAuth login request as the signed-in user (subject-bound)
The Hydra login challenge being accepted.
Where to navigate next to continue the OAuth flow.
curl https://api.koo.io/oauth/login/complete \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "loginChallenge": "example" }'{ "redirectTo": "https://example.com"}Reject (cancel) an OAuth login request — the client receives access_denied
The Hydra login challenge being rejected.
Where to navigate next to continue the OAuth flow.
curl https://api.koo.io/oauth/login/reject \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "loginChallenge": "example" }'{ "redirectTo": "https://example.com"}Describe an in-flight OAuth consent request: client + the signed-in user’s grantable accounts
The Hydra consent_challenge from the authorize redirect.
The OAuth client requesting access (self-declared metadata — show, never trust).
The OAuth scopes the client asked for (informational — authority comes from consent).
The access-token audience(s) the client requested (the MCP resource URLs).
The signed-in user’s accounts — consent grants access to exactly ONE of them.
curl https://api.koo.io/oauth/consent-request?challenge=example \ -H "Authorization: Bearer kc_your_api_token"{ "client": { "clientId": "client_01example0000000000000000x", "clientName": "example", "clientUri": "example", "logoUri": "example" }, "requestedScope": [ "example" ], "requestedAudience": [ "example" ], "accounts": [ { "id": "acct_01example0000000000000000x", "handle": "alice", "displayName": "My app", "myRole": "owner", "grantableRoles": [ "reader" ] } ]}Grant the client access to ONE account at a capped machine role (reader/editor)
The Hydra consent challenge being accepted.
The single account this grant confers access to.
Token role: `editor` (Write) can deploy and manage services; `reader` (Read) is view-only.
Where to navigate next to continue the OAuth flow.
curl https://api.koo.io/oauth/consent/complete \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "consentChallenge": "example", "accountId": "acct_01example0000000000000000x", "role": "reader" }'{ "redirectTo": "https://example.com"}Reject (deny) an OAuth consent request — the client receives access_denied
The Hydra consent challenge being rejected.
Where to navigate next to continue the OAuth flow.
curl https://api.koo.io/oauth/consent/reject \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "consentChallenge": "example" }'{ "redirectTo": "https://example.com"}The MCP clients you have authorized (from Hydra’s consent sessions)
curl https://api.koo.io/me/mcp-grants \ -H "Authorization: Bearer kc_your_api_token"[ { "clientId": "client_01example0000000000000000x", "clientName": "example", "accountId": "acct_01example0000000000000000x", "accountHandle": "example", "role": "reader", "grantedAt": "2026-01-01T00:00:00.000Z" }]Revoke an MCP client’s grant — new requests stop immediately; issued tokens expire within 1 hour
The authorized OAuth client id to revoke.
curl https://api.koo.io/me/mcp-grants/:clientId \ -X DELETE \ -H "Authorization: Bearer kc_your_api_token"RFC 7591 dynamic client registration (hardened proxy in front of Hydra)
curl https://api.koo.io/oauth/register \ -X POST \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "key": "example" }'RFC 7592 client read — not offered (this server issues no registration access tokens)
The registered OAuth client id.
curl https://api.koo.io/oauth/register/:clientId \ -H "Authorization: Bearer kc_your_api_token"RFC 7592 client update — not offered (this server issues no registration access tokens)
The registered OAuth client id.
curl https://api.koo.io/oauth/register/:clientId \ -X PUT \ -H "Authorization: Bearer kc_your_api_token" \ -H "Content-Type: application/json" \ -d '{ "key": "example" }'RFC 7592 client deprovision — not offered (this server issues no registration access tokens)
The registered OAuth client id.
curl https://api.koo.io/oauth/register/:clientId \ -X DELETE \ -H "Authorization: Bearer kc_your_api_token"