Přeskočit na obsah
API dokumentace

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á reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=OAuth.

Operace

Authorization server metadata (RFC 8414)

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

Bez přihlášení.

Odpovědi

  • 200 issuer and endpoints: application/json object

Authorization server metadata (RFC 8414)

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

Bez přihlášení.

Odpovědi

  • 200 issuer and endpoints: application/json object

Protected resource metadata (RFC 9728)

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

Bez přihlášení.

Odpovědi

  • 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 přihlášení.

Odpovědi

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

Authorization (browser redirect to the consent page)

GET /oauth/authorize

Bez přihlášení.

Parametry

NázevKdeTypPovinnéPopis
response_typequerystringano
client_idquerystringano
redirect_uriquerystringano
code_challengequerystringano
code_challenge_methodquerystringano
scopequerystringne
statequerystringne
resourcequerystringne

Odpovědi

  • 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 přihlášení.

Tělo požadavku (application/json)

PoleTypPovinnéPopis
redirect_urisarray of stringanohttps; http only on loopback; custom schemes only of known native clients.
client_namestringne
token_endpoint_auth_methodone of: none, client_secret_post, client_secret_basicne

Odpovědi

  • 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 přihlášení.

Tělo požadavku (application/x-www-form-urlencoded)

PoleTypPovinnéPopis
tokenstringano
token_type_hintstringne

Odpovědi

  • 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 přihlášení.

Tělo požadavku (application/x-www-form-urlencoded)

PoleTypPovinnéPopis
grant_typestringano
codestringne
redirect_uristringne
code_verifierstringne
refresh_tokenstringne
client_idstringne
client_secretstringne
resourcestringne

Odpovědi

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

Chyby

StavKódHodnoty message
400invalid_grant, invalid_request ...