> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ariacompute.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /api/auth/me — 获取当前用户档案

> 返回与会话令牌绑定的账户档案，包含 2FA 状态与账户创建日期。需要会话 Bearer 令牌。

返回 `Authorization` 头中与会话令牌绑定的账户档案。可在登录后用于初始化控制台 UI，或验证令牌是否仍然有效。

**方法：** `GET` **路径：** `/api/auth/me` **认证：** 会话 Bearer

## 响应

<ResponseField name="id" type="string">
  稳定的用户标识。
</ResponseField>

<ResponseField name="email" type="string">
  邮箱地址（若已设置）。
</ResponseField>

<ResponseField name="phone" type="string">
  手机号（若已设置）。
</ResponseField>

<ResponseField name="name" type="string">
  显示名称。
</ResponseField>

<ResponseField name="avatar_url" type="string">
  头像 URL。
</ResponseField>

<ResponseField name="two_factor_enabled" type="boolean">
  是否启用了 2FA。
</ResponseField>

<ResponseField name="created_at" type="string">
  ISO 8601 时间戳。
</ResponseField>

<ResponseField name="updated_at" type="string">
  ISO 8601 时间戳。
</ResponseField>

## 示例

```bash theme={null}
curl -H "Authorization: Bearer eyJhbGciOi..." \
  https://ariacompute.cn/api/auth/me
```

```json theme={null}
{
  "id": "usr_01H...",
  "email": "you@example.com",
  "name": "Jane",
  "two_factor_enabled": true,
  "created_at": "2026-01-14T09:30:00Z",
  "updated_at": "2026-09-20T15:12:00Z"
}
```

## 错误

| 状态    | 含义          |
| ----- | ----------- |
| `401` | 缺失或无效的会话令牌。 |
