API

API-и стандартии панели SMM (v2). Аз бот ё сайти худ фармоиш диҳед, ҳолат ва балансро санҷед.

Усули HTTPPOST
API URL
https://cheapsmm.uz/api/v2
Формати ҷавобJSON

Рӯйхати хизматрасониҳо

Параметрҳо

ПараметрТавсиф
keyYour API key
actionservices

Намунаи ҷавоб

[
    {
        "service": 1,
        "name": "Followers",
        "type": "Default",
        "category": "First Category",
        "rate": "0.90",
        "min": "50",
        "max": "10000"
    },
    {
        "service": 2,
        "name": "Comments",
        "type": "Custom Comments",
        "category": "Second Category",
        "rate": "8",
        "min": "10",
        "max": "1500"
    }
]

Фармоиш додан

Параметрҳо

ПараметрТавсиф
keyYour API key
actionadd
serviceService ID
linkLink to page
quantityNeeded quantity

Параметрҳо

ПараметрТавсиф
keyYour API key
actionadd
serviceService ID
linkLink to page

Параметрҳо

ПараметрТавсиф
keyYour API key
actionadd
serviceService ID
linkLink to page
commentsComments list separated by \n or \r\n

Параметрҳо

ПараметрТавсиф
keyYour API key
actionadd
serviceService ID
linkLink to page
quantityQuantity per run
runsRuns to deliver
intervalInterval in minutes

Параметрҳо

ПараметрТавсиф
keyYour API key
actionadd
serviceService ID
usernameUsername
minQuantity min
maxQuantity max
posts optionalNew posts count
delayDelay in minutes: 0, 5, 10, 15, 30, 60, 90
expiry optionalExpiry date, format Y-m-d

Намунаи ҷавоб

{
    "order": 23501
}

Ҳолати фармоиш

Параметрҳо

ПараметрТавсиф
keyYour API key
actionstatus
orderOrder ID

Намунаи ҷавоб

{
    "charge": "0.27819",
    "start_count": "3572",
    "status": "Partial",
    "remains": "157",
    "currency": "USD"
}

Ҳолатҳо: Pending In progress Processing Completed Partial Canceled

Баланс

Параметрҳо

ПараметрТавсиф
keyYour API key
actionbalance

Намунаи ҷавоб

{
    "balance": "100.84292",
    "currency": "USD"
}

Намунаи код

curl -X POST https://cheapsmm.uz/api/v2 \
  -d key=YOUR_API_KEY \
  -d action=add \
  -d service=1 \
  -d link=https://t.me/channel \
  -d quantity=1000
<?php
function cheapsmm($data) {
    $data['key'] = 'YOUR_API_KEY';
    $ch = curl_init('https://cheapsmm.uz/api/v2');
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $res = curl_exec($ch);
    curl_close($ch);
    return json_decode($res, true);
}

$balance = cheapsmm(['action' => 'balance']);
$order   = cheapsmm(['action' => 'add', 'service' => 1,
                     'link' => 'https://t.me/channel', 'quantity' => 1000]);
$status  = cheapsmm(['action' => 'status', 'order' => $order['order']]);