API
اربط لوحتك أو برنامجك بـ LiberLite. متوافق مع واجهة API v2 القياسية للوحات SMM، لذا تعمل برامج الموزعين الحالية بتغيير الرابط والمفتاح.
طريقة HTTPPOST
رابط APIhttps://liberlite.com/api/v2
صيغة الاستجابةJSON
Service list
| المعاملات | الوصف |
|---|
key | Your API key |
action | services |
مثال على الاستجابة
[
{
"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
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
runs (optional) | Runs to deliver |
interval (optional) | Interval in minutes |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
comments | Comments list separated by \n |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
comments | Comments list separated by \n |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
usernames | Usernames list separated by \n |
hashtags | Hashtags list separated by \n |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
usernames | Usernames list separated by \n |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
hashtag | Hashtag to scrape usernames from |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
username | URL to scrape followers from |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
media | Media URL to scrape likers from |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
username | Username of the comment owner |
| المعاملات | الوصف |
|---|
key | Your API key |
action | add |
service | Service ID |
link | Link to page |
quantity | Needed quantity |
answer_number | Answer number of the poll |
مثال على الاستجابة
{
"order": 23501
}
Order status
| المعاملات | الوصف |
|---|
key | Your API key |
action | status |
order | Order ID |
مثال على الاستجابة
{
"charge": "0.27819",
"start_count": "3572",
"status": "Partial",
"remains": "157",
"currency": "USD"
}
Multiple orders status
| المعاملات | الوصف |
|---|
key | Your API key |
action | status |
orders | Order IDs (separated by a comma, up to 100 IDs) |
مثال على الاستجابة
{
"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
| المعاملات | الوصف |
|---|
key | Your API key |
action | refill |
order | Order ID |
مثال على الاستجابة
{
"refill": "1"
}
Create multiple refill
| المعاملات | الوصف |
|---|
key | Your API key |
action | refill |
orders | Order IDs (separated by a comma, up to 100 IDs) |
مثال على الاستجابة
[
{
"order": 1,
"refill": 1
},
{
"order": 2,
"refill": 2
},
{
"order": 3,
"refill": {
"error": "Incorrect order ID"
}
}
]
Get refill status
| المعاملات | الوصف |
|---|
key | Your API key |
action | refill_status |
refill | Refill ID |
مثال على الاستجابة
{
"status": "Completed"
}
Get multiple refill status
| المعاملات | الوصف |
|---|
key | Your API key |
action | refill_status |
refills | Refill IDs (separated by a comma, up to 100 IDs) |
مثال على الاستجابة
[
{
"refill": 1,
"status": "Completed"
},
{
"refill": 2,
"status": "Rejected"
},
{
"refill": 3,
"status": {
"error": "Refill not found"
}
}
]
Create cancel
| المعاملات | الوصف |
|---|
key | Your API key |
action | cancel |
orders | Order IDs (separated by a comma, up to 100 IDs) |
مثال على الاستجابة
[
{
"order": 9,
"cancel": {
"error": "Incorrect order ID"
}
},
{
"order": 2,
"cancel": 1
}
]
User balance
| المعاملات | الوصف |
|---|
key | Your API key |
action | balance |
مثال على الاستجابة
{
"balance": "100.84292",
"currency": "USD"
}
مثال على كود PHP
انسخ هذا الصنف إلى مشروعك وضع مفتاح 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);
}
متقدم: REST API v1 (طلبات مجمعة، مفاتيح عدم التكرار)
واجهة JSON REST تتيح طلب عدة خدمات لنفس الرابط في طلب واحد. المرجع الكامل: 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}]}'