How to Use an SMM Panel API: A Guide with Code ExamplesLink to section How to Use an SMM Panel API: A Guide with Code Examples
An SMM panel API lets your program order services and track orders automatically, without opening the dashboard. The Instanizer API uses the SMM panel API v2 format, the standard format used by many panels, so an existing script or reseller panel can connect right away. This article shows the steps from the start to the first order, with cURL, Python, and PHP examples.
Not sure what an SMM panel is? First read what an SMM panel is. For the business picture, see how to become an SMM panel reseller.
Technical summaryLink to section Technical summary
- URL:
https://api.instanizer.com/api/v2 - Method:
POST - Body format:
application/x-www-form-urlencoded(recommended), JSON, or multipart/form-data - Response: JSON. The server always returns HTTP 200, so check the contents of the response: if there is an
errorkey, the request failed. - Currency: Rupiah (IDR) for prices, charges, and balance.
Every request must carry the key parameter (your API key) and action (the requested action).
Step 1: create an API keyLink to section Step 1: create an API key
Sign up or log in to your Instanizer account, then open the API menu to create a key. The key is shown only once when it is created, so store it somewhere safe and do not put it in code that is published. If the key leaks, revoke it and create a new one from the same menu.
Also add balance through the Top Up menu, because orders through the API are paid from the same balance as orders through the site.
Step 2: fetch the service listLink to section Step 2: fetch the service list
curl -X POST https://api.instanizer.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=services
The result is a list of services with service (a stable numeric ID), name, category, rate (price per 1,000 in Rupiah, exactly as billed), min, max, and the refill and cancel flags. Use this service ID when creating orders. Services can be added to or removed from the catalog, so re-fetch this list periodically, for example once a day, and store it on your side.
Step 3: create an orderLink to section Step 3: create an order
curl -X POST https://api.instanizer.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=1 \
--data-urlencode link=https://instagram.com/username \
-d quantity=1000 \
-d idempotency_key=order-0001
A successful response contains the order ID, for example { "order": 23501 }. For services of the Default type, service, link, and quantity are enough. The quantity must be between the service's min and max. The balance is deducted when the order is created.
Use idempotency_key. This parameter is optional (1–64 characters: letters, digits, period, underscore, colon, or hyphen), but very useful. If the connection drops before you receive the response and you resend with the same key, the system does not create a second order and returns the ID of the first order, so you are not charged twice.
Step 4: track order statusLink to section Step 4: track order status
curl -X POST https://api.instanizer.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d orders=23501,23502
Use order for a single order or orders (comma-separated, maximum 100) for many at once. The response contains charge (the charge, already accounting for refunds), start_count, status, remains, and currency. The possible status values: Pending, Processing, In progress, Completed, Partial, and Canceled.
Status is updated roughly every 10 minutes, so checking more often is pointless and only uses up your request limit.
Step 5: refill, cancellation, and balanceLink to section Step 5: refill, cancellation, and balance
- Refill (
action=refill) requests a replacement for an order with Completed status on a service that supports refill. An order can only be refilled once per waiting period (24 hours by default). Track it withaction=refill_status. - Cancellation (
action=cancel) requests cancellation of an order. If accepted, the balance is refunded in full. An order that is already running may have its cancellation rejected. - Balance (
action=balance) shows your account balance in Rupiah.
An explanation of the terms refill and drop is in what drop and refill are.
Python code exampleLink to section Python code example
import requests
API_URL = "https://api.instanizer.com/api/v2"
API_KEY = "YOUR_API_KEY"
def call(**params):
response = requests.post(API_URL, data={"key": API_KEY, **params}, timeout=60)
return response.json()
order = call(
action="add",
service=1,
link="https://instagram.com/username",
quantity=1000,
idempotency_key="order-0001",
)
if "error" in order:
print("Failed:", order["error"])
else:
status = call(action="status", order=order["order"])
print(status["status"], "remaining:", status["remains"])
PHP code exampleLink to section PHP code example
<?php
function instanizer(array $params) {
$params['key'] = 'YOUR_API_KEY';
$ch = curl_init('https://api.instanizer.com/api/v2');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($params),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 60,
]);
$body = curl_exec($ch);
curl_close($ch);
return json_decode($body, true);
}
$result = instanizer([
'action' => 'add',
'service' => 1,
'link' => 'https://instagram.com/username',
'quantity' => 1000,
'idempotency_key' => 'order-0001',
]);
if (isset($result['error'])) {
echo 'Failed: ' . $result['error'];
} else {
echo 'Order ID: ' . $result['order'];
}
Handling errorsLink to section Handling errors
Because HTTP is always 200, always check the error key. A few common messages:
Invalid API key: the key is wrong, has been revoked, or the account is disabled.Incorrect service ID: the service is not in the catalog. Re-fetch the service list.Not enough funds on balance: insufficient balance. Add balance through Top Up.Incorrect order ID: the order was not found or does not belong to your account.Maximum 100 IDs per request: too many IDs in one request.Too many requests, please slow down: the request limit was exceeded; wait until the next minute and try again.
Validation or service rejections (for example a quantity below the minimum) are returned with a message in Indonesian. If an order is rejected after the balance has been deducted, the balance is refunded automatically.
Request limitsLink to section Request limits
- About 300 requests per minute for each API key, across all actions.
- 60 new orders (
add) per minute for each API key. - A maximum of 100 IDs per request for
status,refill,refill_status, andcancel. - Attempts with a wrong key are limited per IP address; after passing the limit, that IP is temporarily blocked.
Use multi-order status (orders) rather than checking orders one by one.
Good practicesLink to section Good practices
- Keep the service list on your side and update it once a day; do not call
servicesfor every order. - Always send an
idempotency_keyonadd, and build the key from the order ID in your own system. - Check status in batches, no more often than about once every 10 minutes.
- Record the order ID, starting count (
start_count), and order time to handle customer complaints. - Never put the API key in client-side code or a public repository.
Next stepsLink to section Next steps
The full documentation with all the parameters of each action is in the API Documentation, and a summary of the service is on the SMM panel API page. To set your selling price, see the service list and prices. Ready to try? Sign up for free and create your first API key. Instanizer is not affiliated with any social media platform.