SMM Panel API Errors and How to Fix Them (2026 Guide)
You connected your website or bot to an SMM panel, ran the first request and got back an error, an empty page or a block of HTML instead of JSON. This is the most common moment where resellers get stuck. The good news: almost every SMM panel API problem comes from a short list of causes, and most of them take a few minutes to fix.
This guide is written for the standard API v2 format that most panels use, with real examples from the SafeSMM API. If you are new to the API, start with our SMM panel API guide for resellers and come back here when something breaks.
Quick answer: send every request as a POST to the exact API URL (with https:// and without www), include your key and an action, and always check the JSON for an "error" field, because many panels return errors with HTTP status 200. Most "API not working" reports are one of these four things.
How SMM Panel API Errors Look
An API v2 panel answers in JSON. A successful order looks like this:
{
"status": "success",
"order": 23501
}
An error looks like this:
{
"error": "Invalid API key."
}
Two details catch many developers:
- The HTTP status is usually 200 even when there is an error. If your code only checks for status 200, it will treat a failed request as a success. Always read the JSON and look for the
errorkey. - Error texts differ between panels. Do not hard-code exact messages across providers. Log the full error text and handle it by type (key, order ID, balance, quantity, link).
Quick Troubleshooting Table
| What you see | Most likely cause | Fix |
|---|---|---|
Invalid API key. | Key missing, copied with a space, old key, or the key never reached the server | Copy the key again from the Account page, trim spaces, send it as the key field in a POST body |
Invalid API key. even with the right key | Request sent to http:// or www, redirected, and the POST body was lost | Use the exact URL https://safesmm.net/api/v2 |
| HTML page instead of JSON | Wrong endpoint, for example /api/v1 or a typo in the path | Check the API URL on the documentation page |
Incorrect order ID | Order ID belongs to another account, has a typo, or was sent as text with extra characters | Store the order value from the add response and send it as a plain number |
| Error about balance or funds | Not enough balance for the charge | Add funds, or check the charge before placing the order |
| Error about quantity | Quantity below the service minimum or above the maximum | Read min and max from the services list before ordering |
| Error about service | Service ID removed, disabled or mistyped | Refresh the services list and update your product mapping |
| Order placed but status stays Pending | Private profile, wrong link format or a queue at the provider | Check the link, then follow the pending order checklist |
1. "Invalid API Key" Errors
This is the error you will see most often, and on SafeSMM it is also the answer when the key is missing completely. Check these in order:
- Copy the key again. Open the Account page and copy the API key fresh. Keys pasted from chat apps or emails often pick up a space or a line break at the end.
- Send it in the POST body. The field name is
key, in lowercase, next toaction. Do not put it in a header unless the panel documents that. - Check the URL. If you call
http://safesmm.net/api/v2orhttps://www.safesmm.net/api/v2, the server answers with a 301 redirect to the correct address. Many HTTP clients follow that redirect as a GET request and drop the POST body, so the key never arrives. The result looks exactly like a wrong key. - Did you generate a new key? If you or a team member created a new key, the old one stops working. Update it everywhere: your website, bots and scripts.
Keep the key secret. Never put your API key in front-end JavaScript, a public GitHub repository or a screenshot. Anyone with the key can place orders with your balance.
2. Getting HTML or an Empty Response Instead of JSON
If your code crashes with a JSON parse error, print the raw response first. Usually you will find one of these:
- An error page: the path is wrong (for example
/api/v1or/api). The API URL ishttps://safesmm.net/api/v2. - A redirect page: you used
httporwww. Switch to the exact HTTPS address. - An empty body: a timeout on your side or a blocked outgoing connection on your hosting. Increase the timeout to 30 seconds and make sure your server can make outgoing HTTPS requests.
3. Order ID Errors on Status, Refill and Cancel
The status, refill and cancel actions all need the order ID that the panel returned when you placed the order. When you check many orders at once, the panel answers per order, and a bad ID only affects that one entry:
{
"23501": {
"charge": "0.2750",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
},
"23502": {
"error": "Incorrect order ID"
}
}
So your code should loop over each order and check for error inside it, instead of failing the whole batch. Common causes are saving your own internal order number instead of the panel's ID, or mixing IDs from two different panels.
4. Balance, Quantity and Service Errors When Placing Orders
The add action fails before an order is created when something in the request does not match the service. To avoid most of these, call the services action once and cache it. Each service shows its rate, min, max and whether it supports refill and drip-feed:
{
"service": 1,
"name": "Instagram Followers",
"category": "Instagram",
"type": "default",
"rate": "0.90",
"min": "50",
"max": "10000",
"refill": true,
"dripfeed": true
}
Before every order, check three things in your own code: the quantity is between min and max, the service still exists in the latest list, and your balance covers quantity ร rate / 1000. You can read the balance with the balance action. Refresh the services list at least once a day, because services can be added, changed or removed.
5. Drip-Feed Errors
Drip-feed orders need three numbers: quantity (per run, not total), runs and interval in minutes. On SafeSMM the allowed interval values are 0, 5, 10, 15, 30, 60 and 90. Sending any other value, such as 45 or 1440, can make the request fail. Also check that the service has "dripfeed": true in the services list, because not every service supports it.
Remember that you are charged for the total: 500 per run ร 5 runs = 2,500. Plan runs with this free drip-feed calculator and read safe drip-feed settings for views.
6. Refill and Cancel Requests That Do Nothing
A successful refill request returns {"refill": "1"} and a successful cancel request returns {"cancel": "1"}. If you get an error instead, the usual reasons are:
- The service does not include refill (check
"refill": true), or the refill period has ended. - The current count has fallen below the start count (for example after the account removed followers itself). Refill needs the count to stay above the start count.
- The order has already started delivering, so it can no longer be canceled.
The difference between refill and no-refill services is explained in refill vs no-refill.
7. Duplicate Orders and Wrong Statuses in Your Store
Some of the worst problems do not show an error at all:
- Duplicate orders: your checkout page sends the request twice (a double click or a page refresh). Save the panel's order ID right after the first successful response and never send
addagain for the same customer order. - Statuses that never update: your cron job stopped. Check statuses every 5 to 15 minutes for open orders only, using the multiple-orders call to save requests.
- Misread statuses: Partial means part of the order was delivered and the rest was refunded to your balance. Canceled means it did not run and was refunded. Full meanings are in SMM panel order statuses explained.
Safe Request Code: Python and PHP
These examples send a correct POST request and turn API errors into readable messages.
Python (no extra libraries):
import json, urllib.parse, urllib.request
API_URL = "https://safesmm.net/api/v2" # exact URL, https, no www
API_KEY = "YOUR_API_KEY" # keep this on the server only
def call(action, **params):
data = urllib.parse.urlencode({"key": API_KEY.strip(), "action": action, **params}).encode()
req = urllib.request.Request(API_URL, data=data, method="POST")
with urllib.request.urlopen(req, timeout=30) as r:
raw = r.read().decode()
try:
result = json.loads(raw)
except ValueError:
raise RuntimeError("Not JSON, check the API URL: " + raw[:200])
if isinstance(result, dict) and "error" in result:
raise RuntimeError("API error: " + result["error"])
return result
print(call("balance"))
If you prefer a ready client, our free safesmm Python package does the same checks for you.
PHP (cURL):
function smm_call($action, $params = []) {
$post = array_merge(['key' => trim('YOUR_API_KEY'), 'action' => $action], $params);
$ch = curl_init('https://safesmm.net/api/v2');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query($post),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$raw = curl_exec($ch);
if ($raw === false) { throw new Exception('Connection error: ' . curl_error($ch)); }
curl_close($ch);
$result = json_decode($raw, true);
if ($result === null) { throw new Exception('Not JSON, check the API URL'); }
if (isset($result['error'])) { throw new Exception('API error: ' . $result['error']); }
return $result;
}
print_r(smm_call('balance'));
Running a WooCommerce store? See how to connect the API to WordPress and WooCommerce, including retrying failed orders.
Debug Checklist Before You Contact Support
- Test the
balanceaction first. If it works, your key and URL are correct. - Print the raw response, not only the parsed JSON.
- Confirm the request method is POST and the URL is exactly
https://safesmm.net/api/v2. - Check the service ID,
min,maxand drip-feed support in a fresh services list. - Make sure the link is public and in the format the service expects.
- Log the action, the parameters (without the key) and the full response with a timestamp.
If it still fails, send support the action you called, the response you got and the order ID if there is one. Never send your API key in a ticket or chat.
Frequently Asked Questions
Why does the API say "Invalid API key" when my key is correct?
Most often the request went to http:// or www, was redirected, and the POST body with your key was lost. Use the exact HTTPS URL. Also check for spaces at the start or end of the key.
Why do I get HTTP 200 for a failed request?
Many SMM panels report errors inside the JSON with an error field while the HTTP status stays 200. Always check the JSON content, not only the status code.
Can I send API requests with GET?
Use POST. It is the documented method, and it keeps your key out of server logs and browser history.
What drip-feed interval can I use with the SafeSMM API?
The allowed values are 0, 5, 10, 15, 30, 60 and 90 minutes. The quantity you send is per run.
How often should I check order statuses?
Every 5 to 15 minutes for open orders is enough for most stores. Use the multiple-orders status call instead of one request per order.
Where is the full API documentation?
All actions and example responses are on the SafeSMM API documentation page. Resellers can also read about the SafeSMM reseller panel.
Final Words
API errors look scary in a log file, but they are usually simple: a key that did not arrive, a URL that redirects, a quantity outside the limits or an order ID mix-up. Build your integration to read the error field, validate orders against the services list and log every response, and most problems will explain themselves. When you are ready to test, create a free account and use the balance action as your first check.