---
title: "POST /login"
method: POST
path: "/login"
tags: ["authentication"]
---

# POST /login

`POST /login`

ログインを行います。リダイレクトパラメーターが存在する場合はログイン後にリダイレクトします

## Query parameters

- `redirect` string

## Request body

- UserLogin
  - `name` string, required
  - `pass` string, password, required

## Response `204`

正常にログインできました。

## Other responses

- `302` — 正常にログインできました。リダイレクトします。
- `400` — ログインできませんでした。リクエスト内容が不正です
- `401` — ログインできませんでした。認証情報が間違っています
- `403` — ログインできませんでした。アカウントに問題があります

## Changes

- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `login` was added
- **2019-07-22** `d2f7470b1a57` — 1 breaking
  - the `pass` request property type/format changed from `string`/`` to `string`/`password`
- **2019-07-05** `6956f2622a20` — 10 info
  - api operation id `login` removed and replaced with ``
  - endpoint reactivated
  - added the new optional `query` request parameter `redirect`
  - added optional request body
  - …6 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/login/post.md)

---

[API](https://skmtc.dev/traptitech/apis/traq-api.md) · [All operations](https://skmtc.dev/traptitech/apis/traq-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/traptitech/traq-api/revisions/66a69a1387ed/schema)
