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

# Login User

`POST /api/v1/auth/login`

## Request

- Base URL: `https://calorieapiadmin.com`
- URL: `https://calorieapiadmin.com/api/v1/auth/login`
- Auth: none declared

Login user and return JWT tokens for frontend access.

## Request body

- UserLogin: Schema for user login.
  - `email` string, email, required
  - `password` string, required

## Response `200`

Successful Response

- TokenResponse: Schema for JWT token response.
  - `access_token` string, required
  - `refresh_token` string, nullable
  - `token_type` string
  - `expires_in` integer, required
  - `user` UserResponse: Schema for user response.
    - `id` integer, required
    - `email` string, required
    - `first_name` string, nullable, required
    - `last_name` string, nullable, required
    - `company_name` string, nullable, required
    - `plan_id` integer
    - `is_admin` boolean
    - `email_verified` boolean
    - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/calorieapi/apis/calorie-api.md) · [All operations](https://skmtc.dev/calorieapi/apis/calorie-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calorieapi/apis/calorie-api/revisions/f851bb41617a?raw)
