API

Connectez votre propre panel ou script à LiberLite. Compatible avec l'API v2 standard des panels SMM : les scripts de revendeur existants fonctionnent en changeant l'URL et la clé.

Méthode HTTPPOST
URL de l'APIhttps://liberlite.com/api/v2
Clé APIÀ obtenir sur la page Compte
Format de réponseJSON

Service list

ParamètresDescription
keyYour API key
actionservices

Exemple de réponse

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

Add order

ParamètresDescription
keyYour API key
actionadd
serviceService ID
linkLink to page
quantityNeeded quantity
runs (optional)Runs to deliver
interval (optional)Interval in minutes

Exemple de réponse

{
    "order": 23501
}

Order status

ParamètresDescription
keyYour API key
actionstatus
orderOrder ID

Exemple de réponse

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

Multiple orders status

ParamètresDescription
keyYour API key
actionstatus
ordersOrder IDs (separated by a comma, up to 100 IDs)

Exemple de réponse

{
    "1": {
        "charge": "0.27819",
        "start_count": "3572",
        "status": "Partial",
        "remains": "157",
        "currency": "USD"
    },
    "10": {
        "error": "Incorrect order ID"
    },
    "100": {
        "charge": "1.44219",
        "start_count": "234",
        "status": "In progress",
        "remains": "10",
        "currency": "USD"
    }
}

Create refill

ParamètresDescription
keyYour API key
actionrefill
orderOrder ID

Exemple de réponse

{
    "refill": "1"
}

Create multiple refill

ParamètresDescription
keyYour API key
actionrefill
ordersOrder IDs (separated by a comma, up to 100 IDs)

Exemple de réponse

[
    {
        "order": 1,
        "refill": 1
    },
    {
        "order": 2,
        "refill": 2
    },
    {
        "order": 3,
        "refill": {
            "error": "Incorrect order ID"
        }
    }
]

Get refill status

ParamètresDescription
keyYour API key
actionrefill_status
refillRefill ID

Exemple de réponse

{
    "status": "Completed"
}

Get multiple refill status

ParamètresDescription
keyYour API key
actionrefill_status
refillsRefill IDs (separated by a comma, up to 100 IDs)

Exemple de réponse

[
    {
        "refill": 1,
        "status": "Completed"
    },
    {
        "refill": 2,
        "status": "Rejected"
    },
    {
        "refill": 3,
        "status": {
            "error": "Refill not found"
        }
    }
]

Create cancel

ParamètresDescription
keyYour API key
actioncancel
ordersOrder IDs (separated by a comma, up to 100 IDs)

Exemple de réponse

[
    {
        "order": 9,
        "cancel": {
            "error": "Incorrect order ID"
        }
    },
    {
        "order": 2,
        "cancel": 1
    }
]

User balance

ParamètresDescription
keyYour API key
actionbalance

Exemple de réponse

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

Exemple de code PHP

Copiez cette classe dans votre projet et indiquez votre clé API.

<?php
class Api
{
    /** API URL */
    public $api_url = 'https://liberlite.com/api/v2';

    /** Your API key */
    public $api_key = '';

    /** Add order */
    public function order($data)
    {
        $post = array_merge(['key' => $this->api_key, 'action' => 'add'], $data);
        return json_decode((string)$this->connect($post));
    }

    /** Get order status */
    public function status($order_id)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'status', 'order' => $order_id]));
    }

    /** Get orders status */
    public function multiStatus($order_ids)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'status', 'orders' => implode(',', (array)$order_ids)]));
    }

    /** Get services */
    public function services()
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'services']));
    }

    /** Refill order */
    public function refill(int $orderId)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'refill', 'order' => $orderId]));
    }

    /** Refill orders */
    public function multiRefill(array $orderIds)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'refill', 'orders' => implode(',', $orderIds)]), true);
    }

    /** Get refill status */
    public function refillStatus(int $refillId)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'refill_status', 'refill' => $refillId]));
    }

    /** Get refill statuses */
    public function multiRefillStatus(array $refillIds)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'refill_status', 'refills' => implode(',', $refillIds)]), true);
    }

    /** Cancel orders */
    public function cancel(array $orderIds)
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'cancel', 'orders' => implode(',', $orderIds)]), true);
    }

    /** Get balance */
    public function balance()
    {
        return json_decode($this->connect(['key' => $this->api_key, 'action' => 'balance']));
    }

    private function connect($post)
    {
        $ch = curl_init($this->api_url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; SMM-API-Client)');
        $result = curl_exec($ch);
        if (curl_errno($ch) != 0 && empty($result)) {
            $result = false;
        }
        curl_close($ch);
        return $result;
    }
}

// Examples

$api = new Api();

$services = $api->services(); # Return all services

$balance = $api->balance(); # Return user balance

// Add order

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'runs' => 2, 'interval' => 5]); # Default

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'comments' => "good pic\ngreat photo\n:)\n;)"]); # Custom Comments

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'hashtag' => "test"]); # Mentions Hashtag

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test']); # Package

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'runs' => 10, 'interval' => 60]); # Drip-feed

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'username' => "test"]); # Comment Likes

$order = $api->order(['service' => 1, 'link' => 'http://example.com/test', 'quantity' => 100, 'answer_number' => '7']); # Poll

$status = $api->status($order->order); # Return status, charge, remains, start count, currency

$statuses = $api->multiStatus([1, 2, 3]); # Return orders status, charge, remains, start count, currency

$refill = (array) $api->multiRefill([1, 2]);
$refillIds = array_column($refill, 'refill');
if ($refillIds) {
    $refillStatuses = $api->multiRefillStatus($refillIds);
}
Avancé : API REST v1 (commandes groupées, clés d'idempotence)

Une API REST JSON qui peut passer plusieurs services pour le même lien en une seule commande. Référence complète : OpenAPI JSON

curl -X POST https://liberlite.com/api/v1/orders \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: campaign-001" \
  -d '{"items":[{"service_id":1,"link":"https://instagram.com/p/XYZ","quantity":1000},{"service_id":3,"link":"https://instagram.com/p/XYZ","quantity":1000}]}'