---
title: "POST /oauth2/token"
method: POST
path: "/oauth2/token"
tags: ["authorization"]
---

# POST /oauth2/token

`POST /oauth2/token`

OAuth2 トークンエンドポイント

## Response `200`

トークンが正常に発行されました。

- OAuth2Token
  - `access_token` string, required
  - `token_type` string, required
  - `expires_in` integer
  - `refresh_token` string
  - `scope` string
  - `id_token` string

## Other responses

- `400` — トークン発行に失敗しました。
- `403` — トークン発行に失敗しました。

## Changes

- **2019-07-24** `66a69a1387ed` — 1 info
  - api operation id `postOauth2Token` was added
- **2019-07-22** `d2f7470b1a57` — 1 breaking
  - the `password` request property type/format changed from `string`/`` to `string`/`password`
- **2019-07-05** `6956f2622a20` — 7 info
  - api operation id `postOauth2Token` removed and replaced with ``
  - endpoint reactivated
  - added optional request body
  - added the non-success response with the status `400`
  - …3 more

[Change history](https://skmtc.dev/traptitech/apis/traq-api/changes/oauth2/token/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)
