---
title: "Change Password"
method: POST
path: "/api/auth/change-password"
tags: ["auth"]
---

# Change Password

`POST /api/auth/change-password`

## Request

- Base URL: `https://fojin.app` (the document declares no server; this is the origin it was published from)
- URL: `https://fojin.app/api/auth/change-password`
- Auth: HTTP bearer

修改当前登录用户的密码。

成功后返回一张全新的 JWT（原 JWT 因 password_version 递增而失效），
前端应立刻用返回的新 token 替换本地存储的旧 token。
同一用户在其他设备上的所有旧 JWT 都会在下一次请求时变成 401。

## Request body

- ChangePasswordRequest
  - `old_password` string, required
  - `new_password` string, required

## Response `200`

Successful Response

- TokenResponse
  - `access_token` string, required
  - `token_type` string

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform.md) · [All operations](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/llms.txt) · [OpenAPI document](https://skmtc.dev/fojin/apis/fojin-api-buddhist-digital-text-platform/revisions/969714238c61?raw)
