---
title: "获取 access token"
method: POST
path: "/oauth/token"
tags: ["user"]
---

# 获取 access token

`POST /oauth/token`

## Response `200`

获取成功

- object
  - `access_token` string
  - `token_type` 'bearer'
  - `expires_in` integer — access token 有效期，以秒记
  - `scope` string — 获得的 access token 的授权范围，以空格分隔

## Changes

- **2024-08-14** `aa6951cc6ba1` — 1 breaking, 2 warning, 3 info
  - added the new required request property `grant_type`
  - removed the optional property `expires_at` from the response with the `200` status
  - removed the optional property `scopes` from the response with the `200` status
  - added the optional property `expires_in` to the response with the `200` status
  - …2 more
- **2024-08-14** `31431aaf46d3` — 1 info
  - endpoint added
- **2024-08-12** `abf18f0fc1b3` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/acmclassoj/apis/acmoj-api-v1/changes/oauth/token/post.md)

---

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