เอกสาร API v2 สำหรับ SMM panel
รูปแบบคำขอเหมือนกับ API v2 ที่ใช้ใน SMM panel อื่นๆ สร้างคีย์ API ของคุณในหน้า API ของคอนโซล โดยจะใช้งานได้หลังจากเติมเครดิตครั้งแรก
| วิธีการ HTTP | POST (GET) |
| URL API | https://bropanel2.com/api/v2 |
| รูปแบบคำขอ | application/x-www-form-urlencoded, JSON |
| รูปแบบการตอบกลับ | JSON |
| จำกัดคำขอ | 120 คำขอต่อนาทีต่อคีย์ |
รายการบริการ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | services |
ตัวอย่างการตอบกลับ
[
{
"service": 1,
"name": "Instagram Followers",
"type": "Default",
"category": "Instagram Followers",
"rate": "0.1234",
"min": "10",
"max": "100000",
"refill": true,
"cancel": false
}
]สั่งซื้อ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | add |
service | รหัสบริการ |
link | ลิงก์หน้าสั่งซื้อ |
quantity | จำนวน (ภายในขอบเขตขั้นต่ำและสูงสุดของบริการ) |
ตัวอย่างการตอบกลับ
{
"order": 100231
}สถานะการสั่งซื้อ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | status |
order | รหัสการสั่งซื้อ |
ตัวอย่างการตอบกลับ
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}สถานะการสั่งซื้อหลายรายการ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | status |
orders | รหัสการสั่งซื้อ, คั่นด้วยเครื่องหมายจุลภาค (สูงสุด 100 รหัส) |
ตัวอย่างการตอบกลับ
{
"100231": { "charge": "0.27819", "start_count": "3572", "status": "Partial", "remains": "157", "currency": "USD" },
"100232": { "error": "Incorrect order ID" }
}ขอรีฟิล
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | refill |
order | รหัสการสั่งซื้อ (multiple: orders) |
ตัวอย่างการตอบกลับ
{
"refill": "1"
}สถานะรีฟิล
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | refill_status |
refill | รหัสรีฟิล (multiple: refills) |
ตัวอย่างการตอบกลับ
{
"status": "Completed"
}ยกเลิกการสั่งซื้อ
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | cancel |
orders | รหัสการสั่งซื้อ, คั่นด้วยเครื่องหมายจุลภาค (สูงสุด 100 รหัส) |
ตัวอย่างการตอบกลับ
[
{ "order": 100231, "cancel": 1 },
{ "order": 100232, "cancel": { "error": "Incorrect order ID" } }
]ยอดเงิน
| พารามิเตอร์ | คำอธิบาย |
|---|---|
key | คีย์ API |
action | balance |
ตัวอย่างการตอบกลับ
{
"balance": "100.84292",
"currency": "USD"
}การตอบกลับเมื่อเกิดข้อผิดพลาด
หากคำขอล้มเหลว สาเหตุจะถูกส่งกลับใน single error field
{ "error": "Invalid API key" }
{ "error": "Incorrect service ID" }
{ "error": "Quantity is out of the service range" }
{ "error": "Not enough funds on balance" }ตัวอย่าง PHP
<?php
$post = ['key' => 'YOUR_API_KEY', 'action' => 'add', 'service' => 1,
'link' => 'https://instagram.com/yourname', 'quantity' => 1000];
$ch = curl_init('https://bropanel2.com/api/v2');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = json_decode(curl_exec($ch));
echo $result->order;