SMM panel API (v2)
Every WholeSMM panel speaks the standard SMM panel API (v2) used across the industry, so scripts, bots and other panels can order from it the same way they order from any provider.
Basics
- Address:
https://YOUR-PANEL-DOMAIN/api/v2 - Method: POST (GET also works), form-encoded fields
- Key:
key= the customer's API key from their account page on the panel - Answers: JSON, always HTTP 200; a problem comes back as
{"error": "..."} - Reseller panels have the API on. On a Simplified panel the owner switches it on.
Actions
| action | Fields | What it does |
|---|---|---|
services | — | List of services with your price per 1,000, min, max, refill, cancel |
add | service, link, quantity (optional: runs, interval, comments, order_reference) | Place an order; answers {"order": id} |
status | order, or orders=1,2,3 (up to 100), or order_reference | Order status, charge, start count, remains |
refill | order | Ask for a refill where the service allows it |
refill_status | refill, or refills=1,2,3 | Status of refill requests |
cancel | orders=1,2,3 (up to 100) | Cancel orders not yet sent to the provider |
balance | — | Your balance and currency |
Examples
List services
curl -X POST https://YOUR-PANEL-DOMAIN/api/v2 -d key=YOUR_KEY -d action=services
[{"service":1,"name":"Instagram Followers","type":"Default","category":"Instagram","rate":"90.00","min":"50","max":"10000","refill":true,"cancel":false,"dripfeed":false}]
Place an order
curl -X POST https://YOUR-PANEL-DOMAIN/api/v2 -d key=YOUR_KEY -d action=add -d service=1 -d link=https://instagram.com/example -d quantity=1000
{"order":23501}
Order status
curl -X POST https://YOUR-PANEL-DOMAIN/api/v2 -d key=YOUR_KEY -d action=status -d order=23501
{"charge":"90.00","start_count":"3572","status":"In progress","remains":"157","currency":"INR"}
Status is one of Pending, In progress, Completed, Partial, Canceled. The currency is the panel's own.
Several orders at once
curl -X POST https://YOUR-PANEL-DOMAIN/api/v2 -d key=YOUR_KEY -d action=status -d orders=23501,23502
{"23501":{"charge":"90.00","start_count":"3572","status":"Completed","remains":"0","currency":"INR"},"23502":{"error":"Incorrect order ID"}}
Balance
curl -X POST https://YOUR-PANEL-DOMAIN/api/v2 -d key=YOUR_KEY -d action=balance
{"balance":"1500.00","currency":"INR"}
Code
Ready-made clients for PHP, Python and Node.js (MIT licence): github.com/WholeSMM/smm-panel-api.
PHP
<?php
function smm($action, $fields = []) {
$ch = curl_init('https://YOUR-PANEL-DOMAIN/api/v2');
curl_setopt_array($ch, [CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true,
CURLOPT_POSTFIELDS => http_build_query(['key' => 'YOUR_KEY', 'action' => $action] + $fields)]);
$out = json_decode(curl_exec($ch), true);
curl_close($ch);
return $out;
}
$order = smm('add', ['service' => 1, 'link' => 'https://instagram.com/example', 'quantity' => 1000]);
print_r(smm('status', ['order' => $order['order']]));
Python
import requests
def smm(action, **fields):
r = requests.post("https://YOUR-PANEL-DOMAIN/api/v2",
data={"key": "YOUR_KEY", "action": action, **fields}, timeout=30)
return r.json()
order = smm("add", service=1, link="https://instagram.com/example", quantity=1000)
print(smm("status", order=order["order"]))
Node.js
async function smm(action, fields = {}) {
const r = await fetch('https://YOUR-PANEL-DOMAIN/api/v2', {
method: 'POST',
body: new URLSearchParams({ key: 'YOUR_KEY', action, ...fields }),
});
return r.json();
}
const { order } = await smm('add', { service: 1, link: 'https://instagram.com/example', quantity: 1000 });
console.log(await smm('status', { order }));
Connecting providers to your own panel
The other direction works the same way: in your WholeSMM dashboard you add any SMM provider by pasting its API address and key. Its services load into your panel, you set your prices, and orders are sent to it automatically. Any provider that speaks this standard API works.