---
title: "Retrieve an access and a refresh token"
method: POST
path: "/api/login"
---

# Retrieve an access and a refresh token

`POST /api/login`

Retrieve valid JWT access and refresh tokens to use for accessing the API. Login either by username/password or Auth0 token

## Request body

- ApiLogin
  - `password` string, required
  - `username` string, required

## Response `200`

OK

- ApiJWT
  - `access_token` string
  - `refresh_token` string

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `500` — Internal Server Error

---

[API](https://skmtc.net/datarhei/apis/datarhei-core-api.md) · [All operations](https://skmtc.net/datarhei/apis/datarhei-core-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datarhei/datarhei-core-api/versions/0197dcdcdd5a/schema)
