---
title: "Login User"
method: POST
path: "/api/authentication/login"
tags: ["Authentication"]
---

# Login User

`POST /api/authentication/login`

Logs in user and return JWT(JSON Web Token) which can be used to make API calls. The value of the token
attribute in the response body is the JWT. Note that if a user logs in again the current
JWT will no longer be valid and using it for API calls will return 401(Unauthorized). In
that case the user must log in again. Also note that this means a user can not be logged
in from two different browsers at the same time.

If two factor authentication is used it is no longer enough to just log in a user once to get
a JWT. Instead, after the first login with email and password an email is sent to the user about
to login with a two factor token that needs to be included in another login request together with
the email and password.

## Request body

- Login — Authentication information for user that is logging in.
  - `email` string, nullable, required — Email address of user who is logging in.
  - `twoFactorToken` string, nullable — Two factor validation code received by email after first login step, if using two factor authentication.
  - `password` string, nullable, required — Password for user who is logging in.

## Response `200`

OK

- LoginResult — Authentication information for the user that logged in.
  - `nextStep` string, nullable — Next step to take depending on if password has been entered, a two factor token is required etc. Possible values are: `Complete`, `Email`, `External` and `Password`.
  - `token` string, nullable — JWT to use for the user to make API calls.
  - `releaseNoteToDisplay` string, nullable — The current release not to display for the user that logged in.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

---

[API](https://skmtc.dev/crosser/apis/edge-director-api.md) · [All operations](https://skmtc.dev/crosser/apis/edge-director-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crosser/edge-director-api/revisions/746b3f44e69d/schema)
