elitesocialpulse / smm-panel-api
PHP client for the Elitesocialpulse SMM panel API (standard v2 format): services, orders, status, refills, cancels and balance.
Package info
github.com/elitesocialpulse/smm-panel-api-php
pkg:composer/elitesocialpulse/smm-panel-api
Requires
- php: >=7.4
- ext-curl: *
- ext-json: *
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A small, dependency-free PHP client for the Elitesocialpulse SMM panel API.
The API follows the standard SMM panel v2 format: one POST endpoint, your API key, an action parameter and JSON responses. This library wraps every action in a typed method, handles errors and keeps your integration code short.
- Full API documentation: elitesocialpulse.com/api
- Get an API key: create a free account, then open the Account page.
Requirements
- PHP 7.4 or newer
curlandjsonextensions (enabled on most hosts)
Installation
With Composer:
composer require elitesocialpulse/smm-panel-api
Without Composer, copy the src folder into your project and require both files:
require 'src/ApiException.php'; require 'src/Client.php';
Quick start
use Elitesocialpulse\SmmApi\Client; use Elitesocialpulse\SmmApi\ApiException; $api = new Client('YOUR_API_KEY'); try { $balance = $api->balance(); // ['balance' => '100.84', 'currency' => 'USD'] $services = $api->services(); // every service: ID, name, rate, min, max, refill, cancel $order = $api->add(266, 'https://www.linkedin.com/in/username/', 100); echo $order['order']; // new order ID $status = $api->status($order['order']); echo $status['status']; // Pending, In progress, Completed, Partial, Canceled } catch (ApiException $e) { echo 'API error: ' . $e->getMessage(); }
Service IDs can change when services are updated. Look them up with services() instead of hard-coding them.
Methods
| Method | API action | Returns |
|---|---|---|
services() |
services |
List of services |
add($service, $link, $quantity = null, $extra = []) |
add |
['order' => id] |
status($order) |
status |
Status of one order |
multiStatus([$id, ...]) |
status (orders) |
Statuses keyed by order ID, up to 100 |
refill($order) |
refill |
['refill' => id] |
multiRefill([$id, ...]) |
refill (orders) |
Refill results, up to 100 |
refillStatus($refill) |
refill_status |
Status of one refill |
multiRefillStatus([$id, ...]) |
refill_status (refills) |
Refill statuses, up to 100 |
cancel([$id, ...]) |
cancel |
Cancel results, up to 100 |
balance() |
balance |
Balance and currency |
Drip-feed and other service types
Pass extra parameters in the fourth argument of add():
// Drip-feed: 100 every 60 minutes, 10 times (1,000 in total) $api->add(266, 'https://www.linkedin.com/in/username/', 100, ['runs' => 10, 'interval' => 60]); // Custom comments: one comment per line, no quantity $api->add($serviceId, 'https://www.linkedin.com/feed/update/urn:li:activity:...', null, [ 'comments' => "Great insight\nThanks for sharing", ]);
See the API documentation for the parameters each service type expects.
Errors
- A single-object error such as
{"error": "Incorrect order ID"}throws anApiExceptionwith that message. - Batch methods (
multiStatus,multiRefill,multiRefillStatus,cancel) never throw for one bad item. Each item can carry its ownerrorfield, so check every item. - Network failures, server errors and invalid responses also throw
ApiException.
Good practice
- Keep your API key on your server, in an environment variable or config file. Never put it in browser JavaScript, a mobile app or a public repository.
- Batch status checks with
multiStatus()(up to 100 IDs) instead of one request per order, and stop polling once an order reaches a final status. - Cache the service list and refresh it periodically, not before every order.
Using a panel script instead of code?
Most SMM panel scripts, including Perfect Panel, can add Elitesocialpulse as a provider without any code: add https://elitesocialpulse.com/api/v2 and your API key in the providers section. The API documentation explains the steps.
License
MIT. See LICENSE.