# GET /api/auth/me

Canonical URL: https://developers.iagenify.com/zh/api/auth/me/
Language: zh

`GET https://api.iagenify.com/api/auth/me`

退回已确认的电话人的公共账户记录

Status: Bearer 或 API 密钥 · JSON · read

## HTTP 请求 {#http}

```bash
curl https://api.iagenify.com/api/auth/me \
  -X GET \
  -H "Authorization: Bearer $IAGENIFY_TOKEN"
```

## JavaScript {#javascript}

```javascript
const response = await fetch("https://api.iagenify.com/api/auth/me", {
  method: "GET",
  headers: { Authorization: `Bearer ${process.env.IAGENIFY_TOKEN}` },
});
const result = await response.json();
if (!response.ok) throw new Error(result.error);
```

## Python {#python}

```python
import os, requests

response = requests.request(
    "GET",
    "https://api.iagenify.com/api/auth/me",
    headers={"Authorization": "Bearer " + os.environ["IAGENIFY_TOKEN"]},
    timeout=30,
)
response.raise_for_status()
result = response.json()
```

## 成功响应 {#response}

```javascript
{ ok: true, user: { id: "…", email: "…", credits: 120 } }
```

用户对象为账户的公共代表。 将其他字段视为可选字段, 除非有文件证明您要整合 。

## 错误 {#errors}

| 代码 | 含义 |
| --- | --- |
| no_token | 没有发送支持的授权信头 。 |
| invalid_token | 无记名牌无效 。 |
| session_expired | 持牌会议不再活跃。 |
| user_not_found | 此账户无法使用 。 |
