授權
金鑰喺請求 body 嘅 key 欄位傳送。我哋淨係儲存佢嘅 SHA-256 雜湊,所以由資料庫度還原唔到金鑰 — 如果唔見咗,就發個新嘅。喺儀表板隨時可以停用金鑰,停用之後即刻失效。
一個 HTTP 端點搞掂晒整個流程:攞目錄、建立訂單、查狀態、申請 Refill 或取消。協定同大多數 SMM 面板用嘅格式一樣,所以現成嘅整合通常只要改個地址同金鑰就得。
地址
POST https://webkit.guru/api/v2
淨係支援 POST。可以用 application/x-www-form-urlencoded 或者 application/json 發送 — 兩種格式都接受,回應永遠係 JSON。
金鑰喺請求 body 嘅 key 欄位傳送。我哋淨係儲存佢嘅 SHA-256 雜湊,所以由資料庫度還原唔到金鑰 — 如果唔見咗,就發個新嘅。喺儀表板隨時可以停用金鑰,停用之後即刻失效。
每個 IP 每分鐘 60 個請求。超過會回 429 碼同 Retry-After 標頭,話俾你知要等幾多秒。查狀態最好用 orders 批量查詢,唔好每次淨係查一張訂單。
action=servicesThe full catalogue with prices, limits and refill flags. Prices already include your markup — these are the amounts charged to your balance.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “services” |
回應
[
{
"service": 21251,
"name": "Telegram Views",
"type": "Default",
"category": "Telegram",
"rate": 0.41,
"min": 10,
"max": 50000000,
"refill": true,
"cancel": true
}
]action=addCharges your balance and queues the order. If the provider rejects it, the amount is refunded automatically.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “add” |
| service | int | 係 | Service ID from the services method |
| link | string | 係 | Link to the profile or post. The format is validated per platform and metric |
| quantity | int | 係 | Quantity within the service min and max |
| runs | int | 唔係 | Drip-feed: how many runs |
| interval | int | 唔係 | Drip-feed: interval between runs, in minutes |
回應
{ "order": 84213 }action=statusA single order via order, or up to a hundred at once via orders.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “status” |
| order | int | 唔係 | 訂單編號 |
| orders | int[] | 唔係 | Comma-separated IDs, up to 100 |
回應
{
"charge": "410.00",
"start_count": "15420",
"status": "in_progress",
"remains": "3180",
"currency": "RUB"
}批量回應
{
"84213": { "charge": "410.00", "status": "completed", "remains": "0", "start_count": "15420", "currency": "RUB" },
"84214": { "charge": "120.00", "status": "in_progress", "remains": "890", "start_count": "2310", "currency": "RUB" },
"84215": { "error": "Incorrect order ID" }
}action=refillAvailable for services flagged refill. Returns a refill ID to check the status with.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “refill” |
| order | int | 唔係 | 訂單編號 |
| orders | int[] | 唔係 | Comma-separated IDs, up to 100 |
回應
{ "refill": 1932 }批量回應
[
{ "order": 84213, "refill": 1932 },
{ "order": 84214, "error": "Order is not sent to provider yet" }
]action=refill_statusThe ID is ours, not the provider's — you never need to know which supplier fulfils the order.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “refill_status” |
| refill | int | 唔係 | Refill ID |
| refills | int[] | 唔係 | Comma-separated IDs, up to 100 |
回應
{ "status": "Completed" }批量回應
[
{ "refill": 1932, "status": "Completed" },
{ "refill": 1933, "status": "Pending" }
]action=cancelThe provider may refuse a cancellation, so the order moves to cancel_requested. The actual cancellation and refund are confirmed by status sync.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “cancel” |
| order | int | 唔係 | 訂單編號 |
| orders | int[] | 唔係 | Comma-separated IDs, up to 100 |
回應
{ "cancel": 1 }批量回應
[
{ "order": 84213, "cancel": 1 },
{ "order": 84214, "error": "Incorrect order ID" }
]action=balanceCurrent account balance, in rubles.
| 參數 | 類型 | 必須 | 描述 |
|---|---|---|---|
| key | string | 係 | API key from your dashboard, “API” tab |
| action | string | 係 | The string “balance” |
回應
{ "balance": "12480.50", "currency": "RUB" }cURL
curl -X POST https://webkit.guru/api/v2 \
-d key=YOUR_KEY \
-d action=add \
-d service=21251 \
-d link=https://t.me/example/42 \
-d quantity=1000PHP
<?php
$response = file_get_contents('https://webkit.guru/api/v2', false, stream_context_create([
'http' => [
'method' => 'POST',
'header' => 'Content-Type: application/x-www-form-urlencoded',
'content' => http_build_query([
'key' => 'YOUR_KEY',
'action' => 'add',
'service' => 21251,
'link' => 'https://t.me/example/42',
'quantity' => 1000,
]),
],
]));
$order = json_decode($response, true);Python
import requests
response = requests.post("https://webkit.guru/api/v2", data={
"key": "YOUR_KEY",
"action": "add",
"service": 21251,
"link": "https://t.me/example/42",
"quantity": 1000,
})
order = response.json()JavaScript
const response = await fetch("https://webkit.guru/api/v2", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
key: "YOUR_KEY",
action: "add",
service: 21251,
link: "https://t.me/example/42",
quantity: 1000,
}),
});
const order = await response.json();Status 方法嘅 status 欄位會回傳呢啲值嘅其中一個。
業務邏輯錯誤會回 HTTP 200 同 error 欄位。淨係授權同頻率限制會用 HTTP 狀態碼。