開始使用
連線只需三步
在 PerfectPanel 或任何支援常見 SMM 面板 API 格式的客戶端中使用相同的 API URL 和金鑰。
- 1
建立您的金鑰
建立一個帳戶,然後從配置檔案中生成 API 金鑰。完整金鑰僅顯示一次。
- 2
配置您的面板
在 PerfectPanel 中新增 API 端點作為提供者 URL 並貼上您的 WOWLIKE API 金鑰。
- 3
執行冒煙測試
請求您的餘額,然後匯入服務。 JSON 餘額響應確認連線。
使用 https://wowlike-th.com/api/v2 作為主要終點。如果提供商面板通過 API 版本 1 連線,則使用 https://wowlike-th.com/api/v1. 兩個端點使用相同的 API 金鑰並返回相同的服務資料。
curl -X POST "https://wowlike-th.com/api/v2" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=balance"安全
驗證每個請求
在名為 key 的表單欄位中傳送您的 API 金鑰。該金鑰標識請求使用的會員帳戶、價格、錢包和訂單。
金鑰生命週期
每個帳戶可以啟用一個 API 金鑰。輪換或撤銷它會立即使之前的金鑰失效。 WOWLIKE 僅儲存加密雜湊。
速率限制
讀取操作每分鐘允許 120 個請求。新增和取消操作允許每分鐘 30 個請求。限制適用於每個成員和源 IP。
SERVICES
服務清單
匯入該帳戶當前可用的服務和會員特定價格。
https://wowlike-th.com/api/v2action=services| 範圍 | 型別 | 描述 |
|---|---|---|
| key | string | 您的私人 WOWLIKE 成員 API 金鑰。 |
| action | "services" | 一定是字面值服務。 |
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=services"響應示例
[
{
"service": 123,
"name": "ผู้ติดตาม Instagram — เสถียร",
"nameEn": "Instagram followers — stable",
"descriptionEn": "Stable delivery with refill support.",
"type": "Default",
"rate": 42,
"min": 100,
"max": 10000,
"dripfeed": false,
"refill": true,
"cancel": true,
"category": "บริการ Instagram ประเทศไทย",
"categoryEn": "บริการ Instagram ประเทศไทย"
},
{
"service": 124,
"name": "ความคิดเห็นกำหนดเอง",
"nameEn": "Custom comments",
"descriptionEn": null,
"type": "Custom Comments",
"rate": 85,
"min": 10,
"max": 1000,
"dripfeed": false,
"refill": false,
"cancel": false,
"category": "บริการ Instagram ประเทศไทย",
"categoryEn": "บริการ Instagram ประเทศไทย"
}
]服務是WOWLIKE分配的永久ID,不依賴於提供者ID。 category和categoryEn包含服務組; rate、min、max是JSON數字,而dripfeed、refill、cancel則釋出有效的服務能力。
每個請求都會返回最新的會員價格、限制和可用服務清單,而不使用響應快取。下游系統可以輪詢服務動作來同步資料;輪詢頻率以及是否啟用同步控制取決於下游介面卡。
ADD
新增訂單
為已發布的服務建立訂單,並使用當前會員特定價格從會員錢包中扣除。
https://wowlike-th.com/api/v2action=add| 範圍 | 型別 | 描述 |
|---|---|---|
| key | string | 您的私人 WOWLIKE 成員 API 金鑰。 |
| action | "add" | 必須是文字值新增。 |
| service | integer | 服務操作返回的永久數字服務 ID。 |
| link | URL | 頁面、貼文、個人資料或媒體的公共目標 URL。 |
| quantity | integer | 預設服務所需。請求的金額必須在服務的最小值和最大值範圍內。 |
| comments | string | 自訂留言服務所需。每行傳送一條留言;數量是根據非空行計算的。 |
預設服務
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=add" \
-d "service=123" \
--data-urlencode "link=https://example.com/post" \
-d "quantity=1000"定製留言服務
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=add" \
-d "service=124" \
--data-urlencode "link=https://example.com/post" \
--data-urlencode $'comments=第一條留言\n第二條留言'{
"order": 9001
}對於自訂留言,請省略數量並以換行符分隔的文本形式傳送留言。 WOWLIKE 修剪空白行並使用剩餘行數作為訂單數量。
僅在傳輸失敗且確定未返回訂單號時重試。對於需要保證冪等重試的整合,請使用 REST 訂單端點。
STATUS
訂單狀態
讀取屬於 API 金鑰所有者的一份訂單或最多 100 份訂單。
https://wowlike-th.com/api/v2action=status| 範圍 | 型別 | 描述 |
|---|---|---|
| key | string | 您的私人 WOWLIKE 成員 API 金鑰。 |
| action | "status" | 必須是字面值狀態。 |
| order | integer | 一份 WOWLIKE 訂單號。請勿與訂單一起傳送。 |
| orders | string | 以逗號分隔的訂單號,最多 100 個。請勿與訂單一起傳送。 |
傳送一個或多個訂單,切勿同時傳送。多訂單響應由請求的訂單號作為關鍵字。
# 單筆訂單
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" -d "action=status" -d "order=9001"
# 多個訂單
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" -d "action=status" -d "orders=9001,9002"{
"9001": {
"charge": "42",
"start_count": "1250",
"status": "In progress",
"remains": "600",
"currency": "THB"
},
"9002": {"error": "Incorrect order ID"}
}狀態值
| 地位 | 描述 |
|---|---|
| Pending | 已收到並等待提交或處理。 |
| Processing | 由提供商提交併準備。 |
| In progress | 目前正在交付中。 |
| Completed | 已交付全部要求的數量。 |
| Partial | 部分訂單已交付,未交付的剩餘部分已退款。 |
| Canceled | 訂單被取消或失敗,相應餘額已退還。 |
CANCEL
取消訂單
請求取消最多 100 個其服務廣告取消的活動訂單:true。
https://wowlike-th.com/api/v2action=cancel| 範圍 | 型別 | 描述 |
|---|---|---|
| key | string | 您的私人 WOWLIKE 成員 API 金鑰。 |
| action | "cancel" | 必須是字面值取消。 |
| orders | string | 要取消的以逗號分隔的訂單號,最多 100 個。 |
curl -X POST "https://wowlike-th.com/api/v2" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=cancel" \
-d "orders=9001,9002"[
{"order": 9001, "cancel": 1},
{"order": 9002, "cancel": {"error": "Error calling provider"}}
]cancel:1表示取消請求被接受。當上遊提供商或 WOWLIKE 運營團隊完成它時,它可能仍處於待處理狀態;繼續輪詢訂單狀態以獲得最終結果。
BALANCE
使用者餘額
以 THB 中的十進位制字串形式返回可用的會員錢包餘額。
https://wowlike-th.com/api/v2action=balance| 範圍 | 型別 | 描述 |
|---|---|---|
| key | string | 您的私人 WOWLIKE 成員 API 金鑰。 |
| action | "balance" | 必須是字面值平衡。 |
curl -X POST "https://wowlike-th.com/api/v2" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "key=$WOWLIKE_API_KEY" \
-d "action=balance"{
"balance": "1250.7500",
"currency": "THB"
}錯誤處理
錯誤使用可預測的 JSON 形狀
PerfectPanel 相容響應返回錯誤欄位而不是成功的有效負載。批次操作會報告受影響訂單的錯誤,以便其他專案仍然可以成功。
| 錯誤 | 意義 |
|---|---|
| Invalid API key | 金鑰丟失、格式錯誤、已撤銷或與活躍成員不匹配。 |
| Too many requests | 已超出當前讀取或突變率限制。 |
| Invalid request parameters | 操作或其所需引數之一丟失或格式錯誤。 |
| Service not found | 公共服務ID不存在或不可用。 |
| Incorrect order ID | 該訂單不存在或屬於其他成員。 |
| Insufficient balance | 錢包沒有足夠的可用 THB 餘額。 |
| Invalid quantity | 數量超出服務最小或最大數量。 |
| Error calling provider | 服務或當前訂單狀態不允許取消。 |
PHP
完整的 PHP 示例
這個小型客戶端保持啟用 TLS 驗證,使用連線和請求超時,並在 API 返回錯誤時丟擲。
<?php
final class WowlikeApi {
public function __construct(
private string $apiUrl,
private string $apiKey,
) {}
public function call(string $action, array $parameters = []): array {
$handle = curl_init($this->apiUrl);
curl_setopt_array($handle, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query([
'key' => $this->apiKey,
'action' => $action,
...$parameters,
]),
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYPEER => true,
CURLOPT_HTTPHEADER => ['Accept: application/json'],
]);
$body = curl_exec($handle);
if ($body === false) {
throw new RuntimeException(curl_error($handle));
}
$result = json_decode($body, true, flags: JSON_THROW_ON_ERROR);
if (isset($result['error'])) {
throw new RuntimeException((string) $result['error']);
}
return $result;
}
}
$api = new WowlikeApi('https://wowlike-th.com/api/v2', getenv('WOWLIKE_API_KEY'));
$services = $api->call('services');
$order = $api->call('add', [
'service' => 123,
'link' => 'https://example.com/post',
'quantity' => 1000,
]);
$commentOrder = $api->call('add', [
'service' => 124,
'link' => 'https://example.com/post',
'comments' => "First comment\nSecond comment",
]);
$status = $api->call('status', ['order' => $order['order']]);
$statuses = $api->call('status', ['orders' => '9001,9002']);
$cancellations = $api->call('cancel', ['orders' => '9001,9002']);REST API
高階 REST API
使用 REST 介面進行自訂伺服器整合,該整合受益於 HTTP 狀態程式碼、一致的響應信封和冪等訂單建立。
| 方法 | 端點 | 目的 |
|---|---|---|
| GET | /api/v1/member/services | 列出可用服務 |
| GET | /api/v1/member/balance | 讀取錢包餘額 |
| POST | /api/v1/member/orders | 建立冪等訂單 |
| GET | /api/v1/member/orders/{orderNumber} | 閱讀一份訂單 |
curl "https://wowlike-th.com/api/v1/member/services?locale=zh-TW" \
-H "Authorization: Bearer $WOWLIKE_API_KEY"
curl -X POST "https://wowlike-th.com/api/v1/member/orders" \
-H "Authorization: Bearer $WOWLIKE_API_KEY" \
-H "Idempotency-Key: merchant-order-2026-0001" \
-H "Content-Type: application/json" \
-d '{"serviceId":123,"targetUrl":"https://example.com/post","quantity":1000}'承載認證
在授權中傳送相同的成員金鑰:Bearer <key>。 REST 端點在適用時返回 HTTP 401、403、422 或 429。
安全重試
每個 REST 訂單請求必須包含一個最多 200 個字元的唯一冪等金鑰。重複使用它會返回原始訂單,而不是收取兩次費用。
成功信封
{
"success": true,
"data": {},
"error": null
}需要幫助驗證整合或意外響應嗎? 聯絡支援人員