账户状态
返回账户通过消费获得的两项独立权益:终身 API 吞吐量进度和滚动 90 天折扣进度。此读取不会更改任何值。
POST
https://notpanel.com/api/v3action=account_status需要 API key受速率限制(共享账户 + IP + action)请求体:
application/x-www-form-urlencoded参数
| 名称 | 类型 | 描述 |
|---|---|---|
| key必需 | string | 你的 API key。 |
| action必需 | string | 必须是字面字符串 “account_status”。 |
请求示例
将 YOUR_API_KEY 替换为在你仪表盘 API 页面下生成的 key。
curl -X POST https://notpanel.com/api/v3 \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=YOUR_API_KEY&action=account_status"const res = await fetch("https://notpanel.com/api/v3", {
method: "POST",
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
key: "YOUR_API_KEY",
action: "account_status",
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://notpanel.com/api/v3",
data={
"key": "YOUR_API_KEY",
"action": "account_status",
},
)
print(res.json())<?php
$body = http_build_query([
'key' => 'YOUR_API_KEY',
'action' => 'account_status',
]);
$response = file_get_contents('https://notpanel.com/api/v3', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => "Content-Type: application/x-www-form-urlencoded\r\n",
'content' => $body,
'ignore_errors' => true,
],
]));
print_r(json_decode($response, true));
响应示例
{
"currency": "USD",
"lifetime_successful_spend": "550.00",
"api_rate": {
"tier": 4,
"tier_minimum_spend": "500.00",
"tier_requests_per_minute": 1200,
"effective_requests_per_minute": 1200,
"source": "tier",
"next_tier": 5,
"next_tier_minimum_spend": "1000.00"
},
"discount": {
"level": 5,
"successful_spend_90_days": "550.00",
"window_days": 90,
"percent": 30,
"source": "level",
"next_level": 6,
"next_level_minimum_spend": "1000.00"
}
}常见错误
| 状态 | 响应体 | 原因 |
|---|---|---|
| 403 | {"error":"Account suspended"} | 账户未处于有效状态,因此此 key 无法获取权益状态。 |