API v2 文档

BROPANEL API v2

通过您自己的应用、机器人或面板下单和管理服务。API 遵循标准 SMM 面板 API v2 格式,现有客户端只需更改 URL 和密钥即可使用。

POST
CONTENT TYPE: application/x-www-form-urlencoded · RESPONSE: JSON
您的 API 密钥就是您的访问令牌。 登录 即可查看。
POSTaction = services

服务列表

您可订购的所有服务,以及您的每 1000 单价。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "services".
响应(JSON)
[
  {
    "service": 3289,
    "name": "Instagram Likes[Real Humans][Fast][Non Drop][100% Real - Most Very Good Accounts]",
    "type": "Default",
    "category": "Instagram High Quality Likes",
    "rate": "2.82",
    "min": "10",
    "max": "2000",
    "refill": false,
    "cancel": true
  },
  {
    "service": 2500,
    "name": "Facebook Custom Comment BRAZIL[0-12HRs][100/Daily]",
    "type": "Custom Comments",
    "category": "Facebook BRAZIL",
    "rate": "23.16",
    "min": "1",
    "max": "300",
    "refill": false,
    "cancel": true
  }
]
POSTaction = balance

余额

您的当前余额。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "balance".
响应(JSON)
{
  "balance": "100.84292",
  "currency": "USD"
}
POSTaction = add

添加订单

参数取决于服务 type 由服务列表返回。每个请求还需要 key and action=add.

Default

大多数服务(粉丝、点赞、播放量、流量...)。

参数类型与规则描述
serviceinteger required服务列表中的服务 ID。
linkstring required页面、帖子或网站的公开链接。
quantityinteger required必须介于该服务的 min and max.
runsinteger optional分批投放:分几次交付该数量。
intervalinteger optional分批投放:每次运行间隔的分钟数。
Custom Comments

由您自行撰写评论的评论服务。

参数类型与规则描述
serviceinteger required服务 ID。
linkstring required帖子链接。
commentsstring required每行一条评论(以 \n)。数量 = 行数。
Mentions

提及(@)服务。

参数类型与规则描述
serviceinteger required服务 ID。
linkstring required帖子链接。
quantityinteger required数量。
usernamesstring required要提及的用户名,每行一个。
Package

固定套餐——无需填写数量。

参数类型与规则描述
serviceinteger required服务 ID。
linkstring required链接。
Subscriptions

自动交付到主页的新帖子。

参数类型与规则描述
serviceinteger required服务 ID。
usernamestring required主页用户名。
mininteger required每条帖子的最小数量。
maxinteger required每条帖子的最大数量。
postsinteger optional仅限这么多条新帖子。留空(或配合 old_posts 填 0)表示新帖子不限数量。
old_postsinteger optional同时交付到这么多条已有帖子。
delayinteger required帖子发布后等待的分钟数:0, 5, 10, 15, 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 360, 420, 480, 540, 600。
expirystring optional到期日期,格式 d/m/Y.
响应(JSON)
{
  "order": 23501
}
POSTaction = status

订单状态

单个订单的状态。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "status".
orderinteger required订单 ID。

可以 status values: Pending, In progress, Processing, Completed, Partial, Canceled.

响应(JSON)
{
  "charge": "0.27819",
  "start_count": "3572",
  "status": "Partial",
  "remains": "157",
  "currency": "USD"
}
POSTaction = status

批量状态

单次请求最多查询 100 个订单的状态。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "status".
ordersstring required订单 ID,以逗号分隔,最多 100 个。
响应(JSON)
{
  "1": {
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
  },
  "10": {
    "error": "Incorrect order ID"
  },
  "100": {
    "charge": "1.44219",
    "start_count": "234",
    "status": "In progress",
    "remains": "10",
    "currency": "USD"
  }
}
POSTaction = refill

创建补量

为带补量服务的订单申请补量。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "refill".
orderinteger required订单 ID。
响应(JSON)
{
  "refill": "1"
}
POSTaction = refill

批量补量

为最多 100 个订单申请补量。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "refill".
ordersstring required订单 ID,以逗号分隔,最多 100 个。
响应(JSON)
[
  { "order": 1, "refill": 1 },
  { "order": 2, "refill": 2 },
  { "order": 3, "refill": { "error": "Incorrect order ID" } }
]
POSTaction = refill_status

补量状态

单个补量的状态。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "refill_status".
refillinteger required补量 ID。
响应(JSON)
{
  "status": "Completed"
}
POSTaction = refill_status

批量补量状态

最多 100 个补量的状态。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "refill_status".
refillsstring required补量 ID,以逗号分隔,最多 100 个。
响应(JSON)
[
  { "refill": 1, "status": "Completed" },
  { "refill": 2, "status": "Rejected" },
  { "refill": 3, "status": { "error": "Refill not found" } }
]
POSTaction = cancel

取消订单

取消最多 100 个尚未开始的订单。

参数类型与规则描述
keystring required您的访问令牌(与登录使用的令牌相同)。
actionstring required设置为 "cancel".
ordersstring required订单 ID,以逗号分隔,最多 100 个。
响应(JSON)
[
  { "order": 9, "cancel": { "error": "Incorrect order ID" } },
  { "order": 2, "cancel": 1 }
]

错误

错误以 JSON 形式返回,包含 error field.

错误含义
Invalid API key令牌错误或已被重新生成。请从以下位置获取当前令牌: 个人资料.
Incorrect request缺失或无效 action.
Incorrect service ID服务不存在或已停用。
Quantity less than minimal / more than maximal检查 min and max (见服务列表)。
Not enough funds on balance通过以下网络充值 USDT: 充值 page.
Incorrect order ID订单不存在或属于其他账户。
示例
{
  "error": "Not enough funds on balance"
}

代码示例

现成可用的 PHP 客户端。请替换 YOUR_ACCESS_TOKEN 附上您的令牌,来源: 个人资料.

PHP
<?php
class Api
{
    /** API URL */
    public $api_url = 'https://bropanel2.com/api/v2';

    /** Your access token */
    public $api_key = '';

    /** Add order */
    public function order($data)
    {
        $post = array_merge(['key' => $this->api_key, 'action' => 'add'], $data);
        return json_decode((string)$this->connect($post));
    }

    /** Get order status */
    public function status($order_id)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'status',
            'order' => $order_id
        ]));
    }

    /** Get multiple orders status */
    public function multiStatus($order_ids)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'status',
            'orders' => implode(',', (array)$order_ids)
        ]));
    }

    /** Get services */
    public function services()
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'services',
        ]));
    }

    /** Refill order */
    public function refill(int $orderId)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'refill',
            'order' => $orderId,
        ]));
    }

    /** Refill multiple orders */
    public function multiRefill(array $orderIds)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'refill',
            'orders' => implode(',', $orderIds),
        ]), true);
    }

    /** Get refill status */
    public function refillStatus(int $refillId)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'refill_status',
            'refill' => $refillId,
        ]));
    }

    /** Get multiple refill status */
    public function multiRefillStatus(array $refillIds)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'refill_status',
            'refills' => implode(',', $refillIds),
        ]), true);
    }

    /** Cancel orders */
    public function cancel(array $orderIds)
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'cancel',
            'orders' => implode(',', $orderIds),
        ]), true);
    }

    /** Get balance */
    public function balance()
    {
        return json_decode($this->connect([
            'key' => $this->api_key,
            'action' => 'balance',
        ]));
    }

    private function connect($post)
    {
        $ch = curl_init($this->api_url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
        curl_setopt($ch, CURLOPT_USERAGENT, 'BROPANEL-API-Client/1.0');
        $result = curl_exec($ch);
        if (curl_errno($ch) != 0 && empty($result)) {
            $result = false;
        }
        curl_close($ch);
        return $result;
    }
}

// Examples
$api = new Api();
$api->api_key = 'YOUR_ACCESS_TOKEN';

$services = $api->services(); # Return all services
$balance = $api->balance();   # Return your balance

// Add order
$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'runs' => 2, 'interval' => 5]); # Default (drip-feed optional)
$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'comments' => "good pic\ngreat photo\n:)\n;)"]); # Custom Comments
$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 1000, 'usernames' => "test"]); # Mentions
$order = $api->order(['service' => 1, 'link' => 'http://example.com/test']); # Package
$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'runs' => 10, 'interval' => 60]); # Drip-feed

// Subscriptions: new posts only (limited to 0 = unlimited)
$order = $api->order(['service' => 1, 'username' => 'username', 'min' => 100, 'max' => 110, 'posts' => 0, 'delay' => 30, 'expiry' => '11/11/2026']);
// Subscriptions: unlimited new posts + 5 old posts
$order = $api->order(['service' => 1, 'username' => 'username', 'min' => 100, 'max' => 110, 'old_posts' => 5, 'delay' => 30, 'expiry' => '11/11/2026']);

$status = $api->status($order->order);       # status, charge, remains, start count, currency
$statuses = $api->multiStatus([1, 2, 3]);    # same, for several orders

$refill = (array) $api->multiRefill([1, 2]);
$refillIds = array_column($refill, 'refill');
if ($refillIds) {
    $refillStatuses = $api->multiRefillStatus($refillIds);
}
cURL
curl -X POST https://bropanel2.com/api/v2 \
  -d key=YOUR_ACCESS_TOKEN \
  -d action=add \
  -d service=1 \
  -d link=https://example.com/post \
  -d quantity=100