---
title: "Get Access Token"
method: POST
path: "/user/access_token"
tags: ["Auth"]
---

# Get Access Token

`POST /user/access_token`

Login user by name or email

## Request body

- HandlerParamsUserLogin
  - `email` string, required — The user email
  - `name` string — The username
  - `password` string, required — The user password

## Response `200`

OK

- HandlerResponseUserLogin
  - `token` string, required
  - `user` EntityCookedUser, required
    - `badge_color` string, required
    - `badge_name` string, required
    - `email` string, required
    - `id` integer, required
    - `is_admin` boolean, required
    - `link` string, required
    - `name` string, required
    - `receive_email` boolean, required

## Other responses

- `400` — Multiple users with the same email address are matched
- `401` — Unauthorized
- `500` — Internal Server Error

## Changes

- **2024-02-11** `137ff611bc0e` — 4 info
  - api tag `Auth` added
  - api tag `Account` removed
  - added the non-success response with the status `401`
  - removed the non-success response with the status `403`
- **2024-01-24** `83bbd341664a` — 1 info
  - endpoint added
- **2023-01-28** `6a7a8a92e7c3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/artalkjs/apis/artalk-api/changes/user/access_token/post.md)

---

[API](https://skmtc.dev/artalkjs/apis/artalk-api.md) · [All operations](https://skmtc.dev/artalkjs/apis/artalk-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/artalkjs/artalk-api/revisions/2f927b464019/schema)
