Preskočiť na obsah
API dokumentácia

OAuth 2.1 for AI assistants

Dynamic client registration, authorization code with PKCE, tokens and revocation, server metadata. Used by MCP clients; integrations use API keys instead.

Technická referencia je v angličtine (rovnako ako strojovo čitateľný dokument OpenAPI). Celú skupinu pre AI agenta načítate z /api/openapi.json?tag=OAuth.

Operácie

Authorization server metadata (RFC 8414)

GET /.well-known/oauth-authorization-server

Bez prihlásenia.

Odpovede

  • 200 issuer and endpoints: application/json object

Authorization server metadata (RFC 8414)

GET /.well-known/oauth-authorization-server/mcp

Bez prihlásenia.

Odpovede

  • 200 issuer and endpoints: application/json object

Protected resource metadata (RFC 9728)

GET /.well-known/oauth-protected-resource

Bez prihlásenia.

Odpovede

  • 200 resource, authorization_servers, scopes_supported read and full: application/json object

Protected resource metadata (RFC 9728)

GET /.well-known/oauth-protected-resource/mcp

Bez prihlásenia.

Odpovede

  • 200 resource, authorization_servers, scopes_supported read and full: application/json object

Authorization (browser redirect to the consent page)

GET /oauth/authorize

Bez prihlásenia.

Parametre

NázovKdeTypPovinnéPopis
response_typequerystringáno
client_idquerystringáno
redirect_uriquerystringáno
code_challengequerystringáno
code_challenge_methodquerystringáno
scopequerystringnie
statequerystringnie
resourcequerystringnie

Odpovede

  • 302 To /connect (consent) or back to the client with an error

Dynamic client registration (RFC 7591, at most 20 an hour per address)

POST /oauth/register

Bez prihlásenia.

Telo požiadavky (application/json)

PoleTypPovinnéPopis
redirect_urisarray of stringánohttps; http only on loopback; custom schemes only of known native clients.
client_namestringnie
token_endpoint_auth_methodone of: none, client_secret_post, client_secret_basicnie

Odpovede

  • 201 client_id (and client_secret): application/json object

Chyby

StavKódHodnoty message
400invalid_redirect_uri or invalid_client_metadata

Revoke a token (RFC 7009)

POST /oauth/revoke

Bez prihlásenia.

Telo požiadavky (application/x-www-form-urlencoded)

PoleTypPovinnéPopis
tokenstringáno
token_type_hintstringnie

Odpovede

  • 200 Revoked (also for an unknown token)

Tokens: authorization_code or refresh_token (access pso_... 1 hour, refresh psr_... 30 days, rotated)

POST /oauth/token

Bez prihlásenia.

Telo požiadavky (application/x-www-form-urlencoded)

PoleTypPovinnéPopis
grant_typestringáno
codestringnie
redirect_uristringnie
code_verifierstringnie
refresh_tokenstringnie
client_idstringnie
client_secretstringnie
resourcestringnie

Odpovede

  • 200 access_token, token_type Bearer, expires_in, refresh_token, scope: application/json object

Chyby

StavKódHodnoty message
400invalid_grant, invalid_request ...