---
title: "Authenticate user"
method: POST
path: "/auth/login"
tags: ["Auth"]
---

# Authenticate user

`POST /auth/login`

## Request

- Base URL: `https://api.production.yourmedley.com`
- URL: `https://api.production.yourmedley.com/auth/login`
- Auth: none declared

Authenticate user with email and password, returns access and refresh tokens

## Request body

- LoginRequest
  - `email` string, email, required: User's email address
  - `password` string, password, required: User's password
  - `remember_me` boolean: Whether to extend session duration

## Response `200`

Login successful

- object
  - `success` boolean
  - `data` AuthTokens
    - `accessToken` string
    - `refreshToken` string
    - `expiresIn` number

## Other responses

- `401`: Invalid credentials
- `422`: Validation error

---

[API](https://skmtc.dev/withmedley/apis/medley-api.md) - [All operations](https://skmtc.dev/withmedley/apis/medley-api/llms.txt) - [OpenAPI document](https://skmtc.dev/withmedley/apis/medley-api/revisions/40aaac5ca6bd?raw)
