---
title: "Authenticate user"
method: POST
path: "/api/v1/login"
tags: ["login"]
---

# Authenticate user

`POST /api/v1/login`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/api/v1/login`
- Auth: none declared

Authenticate user to create JWT token

## Request body

- UsersLoginRequestBody
  - `data` UsersData
    - `attributes` UsersAttributes
      - `email` string, required
      - `password` string, required

## Response `200`

OK

- UsersTokenResponseBody
  - `data` UsersTokenAttributes
    - `attributes` UsersTokenAttrib
      - `access_token` string
      - `refresh_token` string
      - `userId` string

## Other responses

- `400`: Bad Request
- `500`: Internal Server Error

---

[API](https://skmtc.dev/nife/apis/nife-io-swagger-api.md) - [All operations](https://skmtc.dev/nife/apis/nife-io-swagger-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nife/apis/nife-io-swagger-api/revisions/6e868dc62795?raw)
