Docs menu

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

Endpointhttps://better-social.pro/api/v2
MethodsPOST with a form-urlencoded or JSON body, or GET with query parameters
Required in every requestkey (your personal API key) and action
Response formatJSON
CurrencyUSD

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

ActionParameters (besides key)Returns
servicesnoneList of available services
addservice, link, quantity, optional comments{"order": ..., "charge": ...}
statusorder (or orders)Status of one order (or several)
multi_statusorders (comma-separated)Statuses keyed by order ID
balancenone{"balance": ..., "currency": "USD"}
refillorder or ordersThe provider's response
cancelorder or ordersThe 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:

FieldTypeMeaning
serviceintegerService ID, used in add
namestringService name
typestringAlways "Default"
categorystringCategory name
ratestringPrice per 1000 in USD, 4 decimals
min, maxstringMinimum and maximum quantity
refillbooleanWhether the service supports refills
cancelbooleanWhether the service supports cancel requests
dripfeedbooleanDrip-feed flag
needs_custom_textbooleanIf 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

ParameterRequiredDescription
serviceyesService ID (integer) from services
linkyesTarget username or link. For TikTok Live services: @username or https://www.tiktok.com/@username
quantityyes*Integer between the service's min and max
commentsfor custom-comment servicesRequired 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
}
  • status comes from the delivery provider (for example Pending, In progress, Completed, Partial, Canceled).
  • remains is the provider's undelivered count, or null if unknown. start_count is currently always null.
  • 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.

HTTPWhen
400Missing 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
401Missing or invalid API key
402Not enough balance for the order
403Account suspended, or the target username is protected
404Service not available
502The delivery provider returned an error
503Maintenance 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 services regularly. 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.