API
Anslut din egen panel eller ditt skript till LiberLite. Kompatibelt med standard-API:t v2 för SMM-paneler, så befintliga återförsäljarskript fungerar genom att byta URL och nyckel.
HTTP-metod POST
API-URL https://liberlite.com/api/v2Kopiera
Svarsformat JSON
Service list Add order Order status Multiple orders status Create refill Create multiple refill Get refill status Get multiple refill status Create cancel User balance PHP-kodexempel
Service list
Parametrar Beskrivning keyYour API key actionservices
Exempelsvar
[
{
"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
Beställningstyp
Default Package Custom Comments Custom Comments Package Mentions with Hashtags Mentions Custom List Mentions Hashtag Mentions User Followers Mentions Media Likers Comment Likes Poll
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity runs (optional)Runs to deliver interval (optional)Interval in minutes
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page commentsComments list separated by \n
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page commentsComments list separated by \n
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernamesUsernames list separated by \n hashtagsHashtags list separated by \n
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page usernamesUsernames list separated by \n
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity hashtagHashtag to scrape usernames from
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernameURL to scrape followers from
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity mediaMedia URL to scrape likers from
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernameUsername of the comment owner
Parametrar Beskrivning keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity answer_numberAnswer number of the poll
Exempelsvar
{
"order": 23501
}
Order status
Parametrar Beskrivning keyYour API key actionstatus orderOrder ID
Exempelsvar
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
Multiple orders status
Parametrar Beskrivning keyYour API key actionstatus ordersOrder IDs (separated by a comma, up to 100 IDs)
Exempelsvar
{
"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
Parametrar Beskrivning keyYour API key actionrefill orderOrder ID
Exempelsvar
{
"refill": "1"
}
Create multiple refill
Parametrar Beskrivning keyYour API key actionrefill ordersOrder IDs (separated by a comma, up to 100 IDs)
Exempelsvar
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
Get refill status
Parametrar Beskrivning keyYour API key actionrefill_status refillRefill ID
Exempelsvar
{
"status": "Completed"
}
Get multiple refill status
Parametrar Beskrivning keyYour API key actionrefill_status refillsRefill IDs (separated by a comma, up to 100 IDs)
Exempelsvar
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
Create cancel
Parametrar Beskrivning keyYour API key actioncancel ordersOrder IDs (separated by a comma, up to 100 IDs)
Exempelsvar
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
User balance
Parametrar Beskrivning keyYour API key actionbalance
Exempelsvar
{
"balance": "100.84292",
"currency": "USD"
}
PHP-kodexempel
Kopiera den här klassen till ditt projekt och ange din API-nyckel.
<?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);
}
Avancerat: REST API v1 (grupperade beställningar, idempotensnycklar)
Ett JSON REST-API som kan lägga flera tjänster för samma länk i en beställning. Fullständig referens: 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}]}'