---
title: "Log in with email and password"
method: POST
path: "/api/auth/login"
tags: ["auth"]
---

# Log in with email and password

`POST /api/auth/login`

## Request

- Base URL: `https://cliponit.app`
- URL: `https://cliponit.app/api/auth/login`
- Auth: none required

Returns `{user, token}`; use `token` as `Authorization: Bearer <token>` (session, 30 days). Accounts created with Google OAuth get 400 « Connecte-toi avec Google ».

## Request body

- object
  - `email` string, email, required
  - `password` string, required

## Response `200`

User + session token (also set as `session` cookie)

- object
  - `user` User, required
    - `id` string, uuid, required
    - `email` string, email, required
    - `name` string, required
    - `avatar_url` string, nullable
    - `locale` string, required
    - `plan` 'free' | 'starter' | 'pro' | 'business', required
    - `onboarded` 0 | 1, required
  - `token` string, required: Session token (64 hex), usable as `Authorization: Bearer <token>` for 30 days

## Other responses

- `400`: Validation error — the message names the field, e.g. `champ subtitles.size invalide : attendu 1..3`
- `401`: Missing or invalid credentials

---

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