GET/api/v1/me查看我的资料

返回当前用户的展示资料。

Request

Headers

NameData TypeRequiredDescription
AuthorizationstringYes会话令牌认证,格式 `Bearer <sessionToken>`
type RequestHeaders = {
  /** 会话令牌认证,格式 `Bearer <sessionToken>` */
  Authorization: string
}

Response

Body

NameData TypeRequiredDescription
userIdstringYes用户 ID
usernamestringYes用户名
displayNamestringYes昵称
avatarUrlstringNo头像地址
statusstringYes账号状态:active / frozen
createdAtstringYes注册时间(ISO 8601 UTC)
type UserProfileDTO = {
  /** 用户 ID */
  userId: string
  /** 用户名 */
  username: string
  /** 昵称 */
  displayName: string
  /** 头像地址 */
  avatarUrl?: string
  /** 账号状态:active / frozen */
  status: string
  /** 注册时间(ISO 8601 UTC) */
  createdAt: string
}
{
  "userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
  "username": "chenlin",
  "displayName": "陈林",
  "avatarUrl": "https://cdn.xeegam.com/passport/avatars/01JD8SEGQ0P9N2XK4L7VDH3T6C.png",
  "status": "active",
  "createdAt": "2026-10-14T08:05:00Z"
}

HTTP Code

HTTP Status Meaning Notes
200 成功 返回当前用户资料

Response Code

响应使用统一信封 {id, code, messages, result},其 code 字段:

code Meaning Notes
0 成功 返回当前用户资料

Examples

GET /api/v1/me
Authorization: Bearer st_7c1f9e05b28d4a63
{
  "id": "01JD8SNTAN2U5W1BV",
  "code": 0,
  "messages": [],
  "result": {
    "userId": "01JD8SEGQ0P9N2XK4L7VDH3T6C",
    "username": "chenlin",
    "displayName": "陈林",
    "avatarUrl": "https://cdn.xeegam.com/passport/avatars/01JD8SEGQ0P9N2XK4L7VDH3T6C.png",
    "status": "active",
    "createdAt": "2026-10-14T08:05:00Z"
  }
}