跳转到内容

获取账户信息

方法: GET

端点: /api/v2/users/account

认证: 支持 Authorization: Bearer <YOUR_API_KEY>api-key: <YOUR_API_KEY>?token=<YOUR_API_KEY>。推荐优先使用 Bearer token。

GET/api/v2/users/accountGet user account
AuthenticationRequired

Stored only in this browser tab. Sent only to https://openapi.coreclaw.com.

Request BodyNot applicable
No JSON request body is defined for this operation.

用于验证 token,并读取账户余额和流量额度。

Terminal window
curl -X GET "https://openapi.coreclaw.com/api/v2/users/account" \
-H "Authorization: Bearer YOUR_API_KEY"
{
"code": 0,
"data": {
"balance": "100.00",
"balance_expiration_at": 1782091200
},
"message": "success",
"request_id": "req-123"
}
字段类型说明
data.balancestring账户余额(字符串数值)。
data.balance_expiration_atinteger余额到期时间,Unix 秒。余额可能到期;具体到期策略请以 Console 或支持为准。
  • API v2 同时支持 Bearer token、旧版 api-key 请求头和 query token;新集成建议优先使用 Bearer token。
HTTP 状态应用代码含义
2000请求成功。
40011000请求参数不合法。
40112001认证缺失或无效。
40411004目标资源不存在。
42913000请求过于频繁。
50010000服务端内部错误。