---
title: "Token"
method: POST
path: "/v1/token"
tags: ["Authentication"]
---

# Token

`POST /v1/token`

Get a token by logging in with your Keycloak credentials. `username` and `password` are required. See "Request body" below.
The `username` field can also be an e-mail address.

Returns **HTTP 200** containing bearer token:

    {
        "access_token": (str)
    }

Raises **HTTP 401** if username/password is incorrect.
Raises **HTTP 423** if the IP has exceeded the maximum number of login attempts.

## Response `200`

Successful Response

- KeycloakToken — Keycloak representation of a token object Attributes: access_token (str): An access token refresh_token (str): An a refresh token, default None id_token (str): An issued by the Authorization Server token id, default None
  - `access_token` string, required
  - `refresh_token` string, nullable
  - `id_token` string, nullable

## Other responses

- `401` — Unauthorized
- `422` — Validation Error
- `423` — Locked

---

[API](https://skmtc.net/navigatr/apis/navigatr-api.md) · [All operations](https://skmtc.net/navigatr/apis/navigatr-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/navigatr/navigatr-api/revisions/4039d06e340b/schema)
