BestPanel API Documentation

Build powerful SMM applications with our easy-to-use REST API

Getting Started

Welcome to the BestPanel API! This guide will help you get started with integrating SMM services into your application.

Perfect for Beginners

Our API is designed to be simple and intuitive. No complex authentication flows or confusing endpoints.

Easy Integration

Simple REST API that works with any programming language

Dynamic Services

Each service can have custom fields with different types

Real-time Status

Track order progress with detailed status updates

Base URL

https://bestpanel.io/api/v2.php

Authentication

Authentication is simple - just include your API key as a query parameter in every request.

Keep Your API Key Safe

Never expose your API key in client-side code. Always make API calls from your server.

Example Request
https://bestpanel.io/api/v2.php?action=services&key=YOUR_API_KEY

Getting API Keys

API keys can be generated from the API Clients section in your admin dashboard.

Quick Start Guide

Follow these steps to make your first API call and place your first order.

1

Get Available Services

First, fetch all available services to see what's available.

curl "https://bestpanel.io/api/v2.php?action=services&key=YOUR_API_KEY"
2

Check Your Balance

Make sure you have sufficient funds to place orders.

curl "https://bestpanel.io/api/v2.php?action=balance&key=YOUR_API_KEY"
3

Place Your First Order

Choose a service and place an order with the required parameters.

curl "https://bestpanel.io/api/v2.php?action=add&key=YOUR_API_KEY&service=1&quantity=100&link=https://example.com"

Test the API

Try our API directly from this page. Enter your API key or use our demo key to test the endpoints.

Using demo key - some features may be limited

Get Services

Retrieve all available services with their configurations

Check Balance

Check your current account balance

Code Examples

JavaScript Example
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://bestpanel.io/api/v2.php';

// Get all services
async function getServices() {
  try {
    const response = await fetch(`${BASE_URL}?action=services&key=${API_KEY}`);
    const services = await response.json();
    console.log('Available services:', services);
    return services;
  } catch (error) {
    console.error('Error fetching services:', error);
  }
}

// Place an order
async function placeOrder(serviceId, quantity, link) {
  try {
    const params = new URLSearchParams({
      action: 'add',
      key: API_KEY,
      service: serviceId,
      quantity: quantity,
      link: link
    });
    
    const response = await fetch(`${BASE_URL}?${params}`);
    const order = await response.json();
    console.log('Order placed:', order);
    return order;
  } catch (error) {
    console.error('Error placing order:', error);
  }
}

// Usage
getServices().then(services => {
  // Use first service as example
  if (services && services.length > 0) {
    placeOrder(services[0].service, 100, 'https://example.com');
  }
});
Python Example
import requests

API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://bestpanel.io/api/v2.php'

def get_services():
    """Get all available services"""
    try:
        response = requests.get(f'{BASE_URL}?action=services&key={API_KEY}')
        response.raise_for_status()
        return response.json()
    except requests.RequestException as e:
        print(f"Error fetching services: {e}")
        return None

def place_order(service_id, quantity, link):
    """Place a new order"""
    try:
        params = {
            'action': 'add',
            'key': API_KEY,
            'service': service_id,
            'quantity': quantity,
            'link': link
        }
        
        response = requests.get(BASE_URL, params=params)
        response.raise_for_status()
        return response.json()
    except requests.RequestException as e:
        print(f"Error placing order: {e}")
        return None

def check_order_status(order_id):
    """Check order status"""
    try:
        params = {
            'action': 'status',
            'key': API_KEY,
            'order': order_id
        }
        
        response = requests.get(BASE_URL, params=params)
        response.raise_for_status()
        return response.json()
    except requests.RequestException as e:
        print(f"Error checking status: {e}")
        return None

# Usage example
if __name__ == "__main__":
    # Get services
    services = get_services()
    if services:
        print(f"Found {len(services)} services")
        
        # Place order with first service
        if len(services) > 0:
            order = place_order(
                service_id=services[0]['service'],
                quantity=100,
                link='https://example.com'
            )
            
            if order and 'order' in order:
                print(f"Order placed: {order['order']}")
                
                # Check status
                status = check_order_status(order['order'])
                if status:
                    print(f"Order status: {status['status']}")