---
title: "Returns the namespace, subject, grants and lifetime of the JWT that authenticates the request."
method: GET
path: "/auth/tokens/inspect"
tags: ["auth::tokens"]
---

# Returns the namespace, subject, grants and lifetime of the JWT that authenticates the request.

`GET /auth/tokens/inspect`

## Request

- Base URL: `https://api.rivet.dev`
- URL: `https://api.rivet.dev/auth/tokens/inspect`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-rivet-token`

## Response `200`

The token's claims. The response carries `Cache-Control: no-store`.

- AuthTokenInspectResponse
  - `namespace` string, required: Name of the namespace the token is scoped to.
  - `subject` string, nullable, required: Subject attached to the token, or `null`.
  - `grants` AuthTokenGrant[], required: Access the token carries.
    - `resource` 'namespace' | 'actor' | 'node' | 'pool' | 'datacenter' | 'actor_gateway' | 'actor_kv', required: Resource type a grant applies to.
    - `target` union, required: `"any"` for every resource of the type, or `{ "id": "..." }` for one resource.
      - 'any'
      - object
        - `id` string, required: A Rivet ID: 30 lowercase base36 characters.
    - `operations` AuthOperationKind[], required: Operations the grant allows on the target.
  - `issued_ts` integer, required: When the token was issued, in Unix milliseconds.
  - `expires_ts` integer, required: When the token expires, in Unix milliseconds.

## Other responses

- `401`: `auth.invalid_token`: the request carries no token, the token is not valid, or it is the admin token rather than a JWT. `auth.token_expired`: the token has expired.
- `500`: `core.internal_error`: an unexpected failure. Details are only logged on the server.
- `503`: `auth.verification_unavailable`: token verification keys are temporarily unavailable. Retry the request.

## Changes

- **2026-10-31** `aa8d1a8a5d14`: 1 breaking, 2 warning, 8 info
  - removed the required property `namespace_id` from the response with the `200` status
  - added the new `node` enum value to the `grants/items/resource` response property for the response status `200`
  - added the new `pool` enum value to the `grants/items/resource` response property for the response status `200`
  - the endpoint scheme security `rivet_token_header` was added to the API
  - …7 more
- **2026-09-23** `cf75c79633e3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/rivet-dev/apis/rivet-api-public/changes/auth/tokens/inspect/get.md)

---

[API](https://skmtc.dev/rivet-dev/apis/rivet-api-public.md) - [All operations](https://skmtc.dev/rivet-dev/apis/rivet-api-public/llms.txt) - [OpenAPI document](https://skmtc.dev/rivet-dev/apis/rivet-api-public/revisions/531e21275aec?raw)
