API SMM-панели для реселлеров
У SMMLotos стандартный API SMM-панели (v2). Подключайте наши услуги к своей панели, боту или скрипту — или добавьте нас как поставщика в другую панель.
Адрес API
POST https://smmlotos.com/api/v2
Отправьте POST-запрос с полями key и action — формой или JSON. Все ответы в JSON. Ошибки выглядят как {"error": "…"}. Лимит — 120 запросов в минуту с одного IP-адреса.
Как получить API-ключ
Зарегистрируйтесь и откройте страницу API в личном кабинете — там ваш личный ключ. Храните его в тайне: любой, у кого он есть, может делать заказы с вашего баланса.
Действия
| Действие | Параметры | Ответ |
|---|---|---|
services | — | Список активных услуг: service, name, category, rate (за 1000), min, max, type, dripfeed, refill, cancel. |
balance | — | Ваш баланс и валюта. |
add | service, link, quantity; для drip-feed дополнительно runs и interval | {"order": 1234}. Заказ оплачивается сразу. |
status | order или orders (до 100 через запятую) | charge, start_count, status, remains по каждому заказу. |
refill | order или orders | ID заявки на рефилл по каждому заказу — для завершённых заказов на услугах с рефиллом. |
refill_status | refill или refills | Статус каждой заявки на рефилл. |
cancel | orders (через запятую) | Результат запроса на отмену по каждому заказу — для услуг с отменой. |
Примеры
Список услуг
curl -X POST https://smmlotos.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=services
Создать заказ
curl -X POST https://smmlotos.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=1 \
-d link=https://example.com/target \
-d quantity=100
{"order": 1234}
Drip-feed заказ: 5 запусков по 100, один запуск каждые 60 минут (всего 500)
curl -X POST https://smmlotos.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=add \
-d service=1 \
-d link=https://example.com/target \
-d quantity=100 \
-d runs=5 \
-d interval=60
Проверить заказ
curl -X POST https://smmlotos.com/api/v2 \
-d key=YOUR_API_KEY \
-d action=status \
-d order=1234
{"charge": 0.2, "start_count": 0, "status": "In progress", "remains": 100}
Drip-feed
Для услуг с dripfeed: true передайте runs (2–1000) и interval (минуты, 1–10080) вместе. Тогда quantity — это количество на один запуск, итог — quantity × runs, и именно он списывается.
Готовый клиент на PHP
Небольшой класс-обёртка над этим API — подставьте свой ключ и пользуйтесь.
Показать код на PHP
<?php
class SMMLotosApi
{
private string $apiUrl;
private string $apiKey;
public function __construct(string $apiKey, string $apiUrl = 'https://smmlotos.com/api/v2')
{
$this->apiKey = $apiKey;
$this->apiUrl = $apiUrl;
}
public function services(): array
{
return $this->call(['action' => 'services']);
}
public function balance(): array
{
return $this->call(['action' => 'balance']);
}
/** $extra: for drip-feed pass ['runs' => 5, 'interval' => 60] (quantity is then per run). */
public function addOrder(int $service, string $link, int $quantity, array $extra = []): array
{
return $this->call(['action' => 'add', 'service' => $service, 'link' => $link, 'quantity' => $quantity] + $extra);
}
/** One id or an array of up to 100 ids. */
public function status(int|array $orderId): array
{
$field = is_array($orderId) ? 'orders' : 'order';
$value = is_array($orderId) ? implode(',', $orderId) : $orderId;
return $this->call(['action' => 'status', $field => $value]);
}
public function requestRefill(int|array $orderId): array
{
$field = is_array($orderId) ? 'orders' : 'order';
$value = is_array($orderId) ? implode(',', $orderId) : $orderId;
return $this->call(['action' => 'refill', $field => $value]);
}
public function refillStatus(int|array $refillId): array
{
$field = is_array($refillId) ? 'refills' : 'refill';
$value = is_array($refillId) ? implode(',', $refillId) : $refillId;
return $this->call(['action' => 'refill_status', $field => $value]);
}
/** Up to 100 order ids. */
public function cancel(array $orderIds): array
{
return $this->call(['action' => 'cancel', 'orders' => implode(',', $orderIds)]);
}
private function call(array $fields): array
{
$ch = curl_init($this->apiUrl);
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => http_build_query(['key' => $this->apiKey] + $fields),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 15,
]);
$body = curl_exec($ch);
if ($body === false) {
throw new \RuntimeException('SMMLotos API request failed: ' . curl_error($ch));
}
curl_close($ch);
return json_decode($body, true) ?? [];
}
}
// Usage:
$api = new SMMLotosApi('YOUR_API_KEY');
$order = $api->addOrder(1, 'https://example.com/target', 100);
$drip = $api->addOrder(1, 'https://example.com/target', 100, ['runs' => 5, 'interval' => 60]);
$state = $api->status($order['order']);