获取当前用户
OpenAPI 契约
- 方法
- GET
- 路径
/api/v1/user/me- 认证
- jwtBearer (bearer)
- 响应状态
- 200 400 401 403 429 500
请求与响应 Schema
JSON
{
"requestBody": {},
"responses": {
"200": {
"description": "Account profile",
"content": {
"application/json": {
"$ref": "#/components/schemas/UserResponse"
}
}
},
"400": {
"description": "Invalid request",
"content": {
"application/json": {
"$ref": "#/components/schemas/RequestError"
}
}
},
"401": {
"description": "Authentication required or invalid",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"403": {
"description": "Authenticated but not permitted",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"429": {
"description": "Rate limit exceeded",
"content": {
"application/json": {
"$ref": "#/components/schemas/SecurityError"
}
}
},
"500": {
"description": "Unexpected server error",
"content": {
"application/json": {
"$ref": "#/components/schemas/ApiError"
}
}
}
}
}GET /api/v1/user/me 仅限 JWT。它返回当前认证用户的资料,包括 id、用户名、邮箱、角色、创建时间、显示名称和工作区设置、套餐、共享偏好、通知设置、双因素标志及信用额度上限。
nfy_ 自动化密钥不能访问该接口。响应包含账户数据:不得向其他用户暴露,也不要缓存到共享的浏览器存储。缺少或无效的 JWT 认证会被拒绝。
http
GET /api/v1/user/me
Authorization: Bearer <access token>