---
title: "Obtain an authentication token"
method: POST
path: "/auth/login.json"
tags: ["Authentication"]
---

# Obtain an authentication token

`POST /auth/login.json`

Returns a JSON object with a `token` key. Also available as `GET` with the
same parameters supplied in the query string. Returns `401 Unauthorized`
when authentication fails, or `422 Unprocessable Entity` when 2-step
verification is enabled and `token2fa` is missing or wrong.

## Response `200`

Token issued.

- Token
  - `token` string — Authentication token, valid for one day.

## Other responses

- `401` — Authentication failed.
- `422` — Two-step verification is enabled and `token2fa` is missing or wrong.

---

[API](https://skmtc.dev/checkvist/apis/checkvist-open-api.md) · [All operations](https://skmtc.dev/checkvist/apis/checkvist-open-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/checkvist/checkvist-open-api/revisions/53311ff6aaab/schema)
