获取账户信息
方法: 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 accountAuthenticationRequired
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.
什么时候使用这个接口
Section titled “什么时候使用这个接口”用于验证 token,并读取账户余额。
curl -X GET "https://openapi.coreclaw.com/api/v2/users/account" \ -H "Authorization: Bearer YOUR_API_KEY"{ "code": 0, "data": { "balance": "2.7129", "balance_expiration_at": 1812418930 }, "message": "success", "request_id": "req-123"}- API v2 同时支持 Bearer token、
api-key请求头和 query token;建议优先使用 Bearer token。
HTTP 响应
Section titled “HTTP 响应”| HTTP 状态 | 应用代码 | 含义 |
|---|---|---|
200 | 0 | 请求成功。 |
400 | 11000 | 请求参数不合法。 |
401 | 12001 | 认证缺失或无效。 |
404 | 11004 | 目标资源不存在。 |
429 | 13000 | 请求过于频繁。 |
500 | 10000 | 服务端内部错误。 |