查询账号或 API Key 余额
查询当前用户或 API Key 的钱包余额。
查询账号或 API Key 余额
curl -X GET "https://router.chbcloud.com/v1/me/balance" \ -H "Authorization: Bearer <YOUR_API_KEY>"
成功响应。
{
"data": {
"balance": 0,
"currency": "string"
},
"message": "string",
"success": true
}返回当前钱包余额。不传 scope 时查询用户余额,设置 scope=token 时查询当前 API Key 余额。本接口只读,建议最小调用间隔为五分钟。
使用 InnoPaaS AppKey 作为 Bearer Token。可在 Console 的 API 密钥页面创建或管理密钥。 查看密钥指南
授权
Authorization查询参数
scope可选。设为 token 查询当前 API Key 余额;不传则查询用户余额。
响应
application/json成功响应。
data余额结果。
展开子字段收起子字段
data.balance当前余额。
data.currency币种,通常为 CNY。
message结果消息;成功时为空。
success查询是否成功。
{
"data": {
"balance": 0,
"currency": "string"
},
"message": "string",
"success": true
}