API
Better Social offers a developer API in the JustAnotherPanel (JAP) v2 style used by many SMM panels, so most existing panel clients work after you change the endpoint and key.
Endpoint and authentication
| Endpoint | https://better-social.pro/api/v2 |
|---|---|
| Methods | POST with a form-urlencoded or JSON body, or GET with query parameters |
| Required in every request | key (your personal API key) and action |
| Response format | JSON |
| Currency | USD |
Getting your key: in the dashboard, open Tools → API. A key is created automatically the first time you open that page. From there you can reveal, copy or regenerate it. When you regenerate, the old key stops working immediately.
API orders follow the same balance and validation rules as orders placed in the dashboard. GET is handy for quick tests, but it puts your key into URLs and server logs, so prefer POST in production.
Keep your API key secret
Anyone with your key can place orders with your balance. Keep it on your server only. Never put it in browser JavaScript, mobile apps or public repositories. If it leaks, regenerate it in the dashboard right away. Better Social staff will never ask you for your API key.
Actions overview
| Action | Parameters (besides key) | Returns |
|---|---|---|
services | none | List of available services |
add | service, link, quantity, optional comments | {"order": ..., "charge": ...} |
status | order (or orders) | Status of one order (or several) |
multi_status | orders (comma-separated) | Statuses keyed by order ID |
balance | none | {"balance": ..., "currency": "USD"} |
refill | order or orders | The provider's response |
cancel | order or orders | The provider's response |
services: list services
curl -X POST https://better-social.pro/api/v2 \
-d key=YOUR_API_KEY \
-d action=services
Returns an array with one object per available service:
| Field | Type | Meaning |
|---|---|---|
service | integer | Service ID, used in add |
name | string | Service name |
type | string | Always "Default" |
category | string | Category name |
rate | string | Price per 1000 in USD, 4 decimals |
min, max | string | Minimum and maximum quantity |
refill | boolean | Whether the service supports refills |
cancel | boolean | Whether the service supports cancel requests |
dripfeed | boolean | Drip-feed flag |
needs_custom_text | boolean | If true, send comments with add |
Example response (illustrative values)
[
{
"service": 101,
"name": "TikTok Live Likes",
"type": "Default",
"category": "TikTok Live",
"rate": "1.5000",
"min": "100",
"max": "100000",
"refill": false,
"cancel": false,
"dripfeed": false,
"needs_custom_text": false
}
]
add: place an order
| Parameter | Required | Description |
|---|---|---|
service | yes | Service ID (integer) from services |
link | yes | Target username or link. For TikTok Live services: @username or https://www.tiktok.com/@username |
quantity | yes* | Integer between the service's min and max |
comments | for custom-comment services | Required when needs_custom_text is true. One comment per line. The quantity is then the number of non-empty lines, and any quantity you send is ignored. |
The charge is rate × quantity ÷ 1000 and is taken from your balance. If your balance is too low, the order is rejected.
curl -X POST https://better-social.pro/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=101 \
-d link=@username \
-d quantity=500
Response
{"order": 123456, "charge": "0.7500"}
Use the returned order value with status, refill and cancel. Manual services return an order ID string and "manual": true, for example {"order": "3f2c...", "manual": true, "charge": "5.0000"}.
Custom comments (JSON body)
curl -X POST https://better-social.pro/api/v2 \
-H "Content-Type: application/json" \
-d '{"key":"YOUR_API_KEY","action":"add","service":202,"link":"@username","comments":"Great stream!\nHello from Podgorica"}'
status: check an order
curl -X POST https://better-social.pro/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d order=123456
Response
{
"charge": "0.7500",
"start_count": null,
"status": "In progress",
"remains": "120",
"currency": "USD",
"order": 123456
}
statuscomes from the delivery provider (for examplePending,In progress,Completed,Partial,Canceled).remainsis the provider's undelivered count, ornullif unknown.start_countis currently alwaysnull.- An unknown order ID returns
{"error": "not found"}. - Each status call asks the provider for a fresh status, so please don't poll in a tight loop.
multi_status: check several orders
Send orders as a comma-separated list (a | separator also works). The response is an object keyed by the IDs you sent. status with several IDs in orders behaves the same way. status with a single ID returns a single object.
curl -X POST https://better-social.pro/api/v2 \
-d key=YOUR_API_KEY \
-d action=multi_status \
-d orders=123456,123457
Response
{
"123456": {"charge": "0.7500", "start_count": null, "status": "Completed", "remains": "0", "currency": "USD", "order": 123456},
"123457": {"error": "not found"}
}
balance: check your balance
curl "https://better-social.pro/api/v2?key=YOUR_API_KEY&action=balance"
Response
{"balance": "12.3400", "currency": "USD"}
refill and cancel
Send order (one ID) or orders (comma-separated). Your request is forwarded to the delivery provider, and the provider's answer is returned unchanged. For several IDs, it comes back as an object keyed by your IDs. Unknown IDs return {"error": "not found"}.
curl -X POST https://better-social.pro/api/v2 \
-d key=YOUR_API_KEY \
-d action=refill \
-d order=123456
Whether a refill or cancel is possible depends on the service (see the refill and cancel flags in services). Our cancellation policy still applies: orders that have started can't be cancelled.
Errors
Errors use HTTP status codes with a JSON body. Most look like {"detail": {"error": "message"}}. Some use a plain string, such as {"detail": "Invalid API key"}. Always check the HTTP status code.
| HTTP | When |
|---|---|
| 400 | Missing action, unknown action, missing or invalid service/link/quantity, quantity outside min/max, comments missing for a custom-comment service, or a link format not allowed for TikTok Live services |
| 401 | Missing or invalid API key |
| 402 | Not enough balance for the order |
| 403 | Account suspended, or the target username is protected |
| 404 | Service not available |
| 502 | The delivery provider returned an error |
| 503 | Maintenance in progress. Please try again later. |
Inside status, multi_status, refill and cancel results, a problem with a single order is reported as {"error": "..."} for that order, with HTTP 200.
Python example
import os
import requests
API = "https://better-social.pro/api/v2"
KEY = os.environ["BETTER_SOCIAL_API_KEY"] # keep the key out of your code
def call(action, **params):
r = requests.post(API, data={"key": KEY, "action": action, **params}, timeout=30)
r.raise_for_status()
return r.json()
print(call("balance"))
order = call("add", service=101, link="@username", quantity=500)
print(call("status", order=order["order"]))
Best practices
- Store the key in an environment variable or secret manager, never in front-end code.
- Regenerate the key if you think it has been exposed, or when someone with access leaves your team.
- Read
servicesregularly. Prices and availability change. - Respect the one-order-per-link rule. See Orders.
- Poll statuses at a reasonable interval, for example every few minutes, ideally with
multi_status.