---
title: Endpoints
summary: Every protocol endpoint a Tessera realm serves, with its method, how it is authenticated and the parameters that matter.
section: reference
order: 1
---
# Endpoints

Every protocol endpoint a Tessera realm serves, with its method, how it is authenticated and the parameters that matter.

Paths below are relative to the issuer. On the shared host the issuer is `https://login.kurthlabs.com/realms/<realm>`, so `/token` is `https://login.kurthlabs.com/realms/<realm>/token`. On a realm with its own login domain the issuer is the bare domain, such as `https://login.acme.example`, and `/token` is `https://login.acme.example/token`. Your library should read the URLs from discovery. See [Connect your app](/docs/connect/overview.md).

## Summary

| Endpoint | Method | Path | Authentication |
| --- | --- | --- | --- |
| Discovery (OIDC) | GET | `/.well-known/openid-configuration` | None |
| Discovery (OAuth 2.0) | GET | `/.well-known/oauth-authorization-server` | None |
| Discovery by path insertion (shared host) | GET | `/.well-known/oauth-authorization-server/realms/<realm>`, `/.well-known/openid-configuration/realms/<realm>` | None |
| Signing keys | GET | `/jwks` | None |
| Authorize | GET | `/authorize` | The person, in a browser |
| Token | POST | `/token` | Client (public clients send only `client_id`) |
| Userinfo | GET, POST | `/userinfo` | Bearer access token |
| End session | GET | `/logout` | None (the browser's session) |
| Introspect | POST | `/introspect` | Confidential client only |
| Revoke | POST | `/revoke` | Client (public clients send only `client_id`) |
| Revocations feed | GET | `/revocations` | None |
| Device authorization | POST | `/device` | Client (public clients send only `client_id`) |
| Dynamic registration | POST | `/register` | Initial access token, if the realm requires one |

Parameters of `/token`, `/introspect`, `/revoke` and `/device` are read from the request body only. A value in the query string is ignored, so a secret or code in a URL is never accepted.

## Discovery

`GET /.well-known/openid-configuration` returns the standard OIDC document. `/.well-known/oauth-authorization-server` returns the same fields without the OIDC-only ones (userinfo, end session, logout support, ID token algorithms, subject types and claims). Both answer `Cache-Control: public, max-age=3600` and allow any origin.

On the shared host the same two documents are also served by path insertion (RFC 8414 section 3.1), the form MCP clients and many OAuth libraries try first:

- `https://login.kurthlabs.com/.well-known/oauth-authorization-server/realms/<realm>`
- `https://login.kurthlabs.com/.well-known/openid-configuration/realms/<realm>`

They return exactly the same document and headers as `https://login.kurthlabs.com/realms/<realm>/.well-known/oauth-authorization-server` and `.../openid-configuration`, with the same `issuer`. An unknown realm answers 404 on all four URLs.

Fields you can rely on:

| Field | Value |
| --- | --- |
| `issuer` | The issuer, exactly as tokens carry it in `iss` |
| `authorization_endpoint`, `token_endpoint`, `jwks_uri` | Always present |
| `device_authorization_endpoint` | Always present: the `/device` endpoint |
| `userinfo_endpoint`, `end_session_endpoint` | OIDC document only |
| `revocation_endpoint`, `introspection_endpoint` | Always present |
| `revocation_endpoint_auth_methods_supported` | `client_secret_basic`, `client_secret_post` |
| `introspection_endpoint_auth_methods_supported` | `client_secret_basic`, `client_secret_post`, `private_key_jwt` |
| `authorization_response_iss_parameter_supported` | `true`: the authorization response carries `iss` (RFC 9207). Check it against the issuer |
| `tessera_revocations_endpoint` | The revocations feed |
| `registration_endpoint` | Only when the realm allows dynamic registration |
| `client_id_metadata_document_supported` | `true` only when the realm trusts client metadata documents |
| `response_types_supported` | `["code"]` |
| `response_modes_supported` | `query`, `fragment`, `form_post` |
| `grant_types_supported` | `authorization_code`, `refresh_token`, `client_credentials`, device code, token exchange, JWT bearer |
| `token_endpoint_auth_methods_supported` | `client_secret_basic`, `client_secret_post`, `none`, `private_key_jwt` |
| `token_endpoint_auth_signing_alg_values_supported` | `EdDSA`, `RS256`, `ES256` (for a `private_key_jwt` assertion) |
| `code_challenge_methods_supported` | `["S256"]` |
| `scopes_supported` | `openid`, `profile`, `email`, `address`, `phone`, `offline_access` |
| `prompt_values_supported` | `none`, `login`, `consent`, `select_account` |
| `acr_values_supported` | What the realm's sign-in policy can produce |
| `id_token_signing_alg_values_supported` | `EdDSA`, `RS256` |
| `dpop_signing_alg_values_supported` | Algorithms accepted for DPoP proofs |
| `resource_indicators_supported` | `true` |
| `backchannel_logout_supported`, `backchannel_logout_session_supported`, `frontchannel_logout_supported`, `frontchannel_logout_session_supported` | `true` (OIDC document only) |

## Signing keys: `/jwks`

`GET /jwks` returns a JSON Web Key Set with the realm's public keys, both `EdDSA` (Ed25519) and `RS256`. Pick the key by the token header's `kid`. It is cached for five minutes. Keys rotate, so refetch when you see an unknown `kid`, but not more than once every 30 seconds.

## Authorize: `/authorize`

Starts a sign-in. `GET` only, with the parameters in the query string. Key parameters: `response_type=code`, `client_id`, `redirect_uri`, `scope`, `state` (required), `code_challenge` and `code_challenge_method=S256` (required, with a challenge of 43 to 128 characters from `A-Z a-z 0-9 - . _ ~`), `nonce`, `resource`, `prompt` (`none`, `login`, `consent`, `select_account`), `max_age`, `acr_values`, `login_hint`, `id_token_hint`, `response_mode`. Details and an example are in [The sign-in flow](/docs/connect/sign-in-flow.md).

- **`resource`.** A plain sign-in app sends none: its access token is then issued for the app itself, with `aud` equal to its own `client_id`. `resource` matters for an API or an MCP server. A client with allowed resources that sends none gets the first one it is allowed, and an MCP client must name its resource. A resource the client is not allowed shows the hosted error "resource indicator is invalid".
- **`redirect_uri`.** It must match a registered address exactly, with one exception: an `http` loopback IP address (`127.0.0.1` or `[::1]`) matches a registration that differs only in its port, as RFC 8252 allows for native apps. `localhost` is not port-flexible. An address can be registered when it is `https`, `http` on `localhost` or a loopback IP, or a reverse-domain private-use scheme such as `com.example.app:/callback`, and has no fragment or credentials. Registering anything else is refused (the admin API answers 400 with the error code `redirect_uri_invalid`).
- **The response.** The browser comes back to `redirect_uri` with `code`, `state` and `iss`, in the query, the fragment or a form post, depending on `response_mode`. Outcomes that depend on the person or the session (`login_required`, `interaction_required`, `access_denied`) and an invalid `prompt` or `response_mode` come back the same way, with `error`, `state` and `iss`. Problems with the client or the request itself, such as an unknown client, an unregistered `redirect_uri`, a missing `state` or challenge, or a scope or resource that is not allowed, show a hosted error page with a code and redirect nowhere.
- **Codes.** An authorization code works once. Presenting it a second time fails, and the tokens issued from the first exchange are revoked.

## Token: `/token`

`POST` with `application/x-www-form-urlencoded`, and every parameter in the body. The client authenticates with HTTP Basic, form fields (`client_id` and `client_secret`), or a signed key assertion (`client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer`). Do not send credentials twice. Public clients send only `client_id` and must not send a secret. A failed client authentication answers `401` with `invalid_client`, and repeated failures are throttled with `429`. Answers are `Cache-Control: no-store` JSON.

```text
curl -s https://login.kurthlabs.com/realms/<realm>/token \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode grant_type=authorization_code \
  --data-urlencode client_id=<client_id> \
  --data-urlencode code=<code> \
  --data-urlencode redirect_uri=<redirect_uri> \
  --data-urlencode code_verifier=<verifier>
```

Add `-u '<client_id>:<client_secret>'` (and drop the `client_id` field) for a confidential client. Send no `resource` for a plain sign-in app.

| `grant_type` | Used for | Main parameters |
| --- | --- | --- |
| `authorization_code` | Finishing a browser sign-in | `code`, `redirect_uri`, `code_verifier` (43 to 128 characters). The code works once; a second use fails with `invalid_grant` and revokes the tokens the first use issued |
| `refresh_token` | Getting new tokens without the person | `refresh_token` |
| `client_credentials` | A server calling an API as itself (confidential clients only) | `resource` (required), `scope` |
| `urn:ietf:params:oauth:grant-type:device_code` | Finishing a device sign-in | `device_code` |
| `urn:ietf:params:oauth:grant-type:token-exchange` | An agent or service acting for a person | `subject_token`, `subject_token_type`, `actor_token`, `audience` or `resource`. See [Acting for a person](/docs/agents/acting-for-a-person.md) |
| `urn:ietf:params:oauth:grant-type:jwt-bearer` | A workload proving itself with a token from a trusted issuer | `assertion`. See [Workload identity](/docs/agents/workload-identity.md) |

A client may only use the grants it was registered with; otherwise the answer is `unauthorized_client`. An unknown `grant_type` is `unsupported_grant_type`. Token errors are JSON with `error`, `error_description`, `error_code` and `error_uri`; look the `error_code` up in the [error catalogue](/errors/index.md).

A successful answer looks like this. `refresh_token` and `id_token` appear only when they apply.

```json
{
  "access_token": "eyJ...",
  "token_type": "Bearer",
  "expires_in": 900,
  "refresh_token": "Xk9...",
  "scope": "openid profile email offline_access",
  "id_token": "eyJ..."
}
```

`expires_in` is the realm's access token lifetime (900 seconds by default). `token_type` is `DPoP` when the client binds tokens to a DPoP key. `id_token` appears when the scope includes `openid`, and `refresh_token` when it includes `offline_access` (or when you refresh). Browsers may call `/token` from the web origins registered on the client.

## Userinfo: `/userinfo`

`GET` or `POST` with `Authorization: Bearer <access token>`. The token may be for any audience in the realm, including your app's own `client_id`. Returns `sub`, then `email` and `email_verified` (scope `email`), `preferred_username` (scope `profile`), `groups`, `roles` and `permissions` when the user has any, and `agreements` when one applies. A missing or bad token answers `401` with a `WWW-Authenticate: Bearer` challenge.

## End session: `/logout`

`GET` only. Parameters: `id_token_hint` or `client_id`, `post_logout_redirect_uri`, `state`. The request ends the browser's session in this realm at once. Send `id_token_hint` (your app's ID token) so the request is tied to your client, and so the signed-out page takes on the app's look; the redirect to `post_logout_redirect_uri` happens only for an address registered on that client. See [Logout](/docs/connect/logout.md).

## Introspect: `/introspect`

`POST` with `token` and client authentication, as a form body. Only a confidential client may call it: a public client is refused with `401` and `invalid_client`, because it has no credential to be authorized by. Returns `{"active": false}` for any token that is not active or not meant for the caller. For an active token it returns `active: true` with `iss`, `sub`, `aud`, `scope`, `exp`, `iat`, `nbf`, `jti`, `client_id`, `roles`, `permissions`, `cnf`, `act` and `may_act` when present, plus `username`, `token_type`, `realm` and `principal_type`, and `delegation_depth` for a delegated token.

A confidential client may introspect its own tokens, and one registered for the token's audience (a resource server) may introspect tokens meant for it (without `username`). Refresh tokens issued to the calling client can be introspected too. Prefer validating the JWT locally and call introspection where you need to know about revocation right now.

## Revoke: `/revoke`

`POST` with `token` (and optionally `token_type_hint`) and client authentication, as a form body. A confidential client authenticates with `client_secret_basic` or `client_secret_post`, a public client sends only `client_id`. Revoking a refresh token revokes its whole chain. Revoking an access token ends that token, but only one issued to the calling client. After the client authenticates, it answers `200` with an empty body whether or not the token existed.

## Revocations feed: `/revocations`

`GET /revocations?since=<cursor>&limit=<n>` returns, as a signed document (`Content-Type: application/revocations+jwt`, header `typ` `revocations+jwt`), the revoked token IDs and revocation cutoffs after a cursor. It lets an API reject revoked tokens without calling introspection on every request. `limit` is 1 to 1000 (default 500). The payload has `iss`, `iat`, `exp` (five minutes), `cursor`, `has_more` and `events` (each with `seq`, `kind` and some of `sub`, `nbf`, `jti`, `exp`). Pass the returned `cursor` as `since` next time. Poll it every 30 seconds or so. See [Revocation and the kill switch](/docs/agents/revocation-and-kill-switch.md).

## Device authorization: `/device`

For apps with no browser, such as the `tessera` CLI. `POST` as a form body with `client_id` (plus the client secret for confidential clients), and optional `scope` and `resource`. The client must be allowed the device grant. Without `scope`, the client's allowed scopes are requested; without `resource`, its allowed resources. Starts are rate limited per client and per address (`429`).

```json
{
  "device_code": "Qw8...",
  "user_code": "BCDF-GHJK",
  "verification_uri": "https://login.kurthlabs.com/realms/acme/device-confirm",
  "expires_in": 600,
  "interval": 5
}
```

Show the person `verification_uri` and `user_code`; they type the code there and sign in. The code works for 10 minutes. Meanwhile poll `/token` with the device grant every `interval` seconds. The answers are `authorization_pending` (keep waiting), `slow_down`, `access_denied`, `expired_token` or tokens. After `slow_down` the interval grows by 5 seconds each time, up to 5 minutes, so wait the longer time. Wrong user codes typed at the page are limited, and a pending code is cancelled after 5 approvals that the app's access rules refuse. A `verification_uri_complete` is never sent, so a code cannot be passed in a link.

## Dynamic registration: `/register`

`POST /register` with a JSON body (`Content-Type: application/json`) registers a client (RFC 7591) and answers `201` with its `client_id`, a `registration_access_token` and a `registration_client_uri`. `GET` and `DELETE /register/<client_id>` read and remove it with that token (`DELETE` answers `204`). The realm decides whether it is open, needs an initial access token, or is off (then `/register` answers `404` and discovery omits `registration_endpoint`). A `software_statement` is refused with `invalid_software_statement`. Registered clients are third-party and need consent. See [Protect an MCP server](/docs/agents/protect-an-mcp-server.md).

## Admin API

Management calls live under `/admin/v1` on the admin host (`https://login.kurthlabs.com`), with a bearer token whose audience is `tessera-admin`. Bodies are JSON; send `Content-Type: application/json`. The OpenAPI document is at `/admin/v1/openapi.json`. Most people use [the `tessera` CLI](/docs/reference/cli.md) instead of calling it directly.
