账户 API
查询账号信息
POST/v1/me
查询当前用户账户详情。
- 完整地址
- https://otranslator.com/api/v1/me
- 认证
- 需要在 Authorization 请求头中传入 API Key
- Content-Type
- application/json
- 错误格式
- { "error": "Invalid API key." }
注意事项
该接口使用 Authorization 请求头中的 API Key 识别当前账号。
示例
curl
1curl -X POST 'https://otranslator.com/api/v1/me' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{}'响应
| 参数 | 类型 | 默认 | 描述 | 示例 |
|---|---|---|---|---|
| balance | Integer | - | 剩余积分 | - |
常见错误
401 Missing API key.
The Authorization request header is required.
401 Invalid API key.
The API key does not exist, has been deleted, or is no longer valid.