API
Unganisha paneli au programu yako na LiberLite. Inaendana na API v2 ya kawaida ya paneli za SMM, hivyo programu za wauzaji zilizopo zinafanya kazi kwa kubadilisha URL na ufunguo.
Mbinu ya HTTP POST
URL ya API https://liberlite.com/api/v2Nakili
Muundo wa jibu 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 Mfano wa msimbo wa PHP
Service list
Vigezo Maelezo keyYour API key actionservices
Mfano wa jibu
[
{
"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
Aina ya agizo
Default Package Custom Comments Custom Comments Package Mentions with Hashtags Mentions Custom List Mentions Hashtag Mentions User Followers Mentions Media Likers Comment Likes Poll
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity runs (optional)Runs to deliver interval (optional)Interval in minutes
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page commentsComments list separated by \n
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page commentsComments list separated by \n
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernamesUsernames list separated by \n hashtagsHashtags list separated by \n
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page usernamesUsernames list separated by \n
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity hashtagHashtag to scrape usernames from
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernameURL to scrape followers from
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity mediaMedia URL to scrape likers from
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity usernameUsername of the comment owner
Vigezo Maelezo keyYour API key actionadd serviceService ID linkLink to page quantityNeeded quantity answer_numberAnswer number of the poll
Mfano wa jibu
{
"order": 23501
}
Order status
Vigezo Maelezo keyYour API key actionstatus orderOrder ID
Mfano wa jibu
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
Multiple orders status
Vigezo Maelezo keyYour API key actionstatus ordersOrder IDs (separated by a comma, up to 100 IDs)
Mfano wa jibu
{
"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
Vigezo Maelezo keyYour API key actionrefill orderOrder ID
Mfano wa jibu
{
"refill": "1"
}
Create multiple refill
Vigezo Maelezo keyYour API key actionrefill ordersOrder IDs (separated by a comma, up to 100 IDs)
Mfano wa jibu
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
Get refill status
Vigezo Maelezo keyYour API key actionrefill_status refillRefill ID
Mfano wa jibu
{
"status": "Completed"
}
Get multiple refill status
Vigezo Maelezo keyYour API key actionrefill_status refillsRefill IDs (separated by a comma, up to 100 IDs)
Mfano wa jibu
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
Create cancel
Vigezo Maelezo keyYour API key actioncancel ordersOrder IDs (separated by a comma, up to 100 IDs)
Mfano wa jibu
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
User balance
Vigezo Maelezo keyYour API key actionbalance
Mfano wa jibu
{
"balance": "100.84292",
"currency": "USD"
}
Mfano wa msimbo wa PHP
Nakili darasa hili kwenye mradi wako na weka ufunguo wako wa 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);
}
Ya hali ya juu: REST API v1 (maagizo ya pamoja, funguo za idempotency)
API ya JSON REST inayoweza kuweka huduma kadhaa kwa kiungo kimoja katika agizo moja. Maelezo kamili: 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}]}'