RESELLER API · v2.0 · DHRU FUSION COMPATIBLE

Connect Any
Platform

The Apizu Tool Reseller API lets you integrate any platform — Dhru Fusion, GSMTheme, PHP, Python, JavaScript, Node.js, or any custom script — using simple HTTP POST requests.

POST
apizutool.one/reseller-api/api.php
5
Actions
60/m
Rate Limit
JSON
Format
ALL
Platforms
01 · Authentication

Your API Key

Every request must include your API key. Three methods are supported — use whichever your platform or language prefers.

Method 1 — POST parameter (recommended for all platforms)

HTTP POST BODY
Content-Type: application/x-www-form-urlencoded

action=balance&apiaccesskey=YOUR_API_KEY

Method 2 — X-API-Key header (for REST clients)

HTTP HEADER
X-API-Key: YOUR_API_KEY

Method 3 — Authorization Bearer (for apps)

HTTP HEADER
Authorization: Bearer YOUR_API_KEY
02 · Platforms

All Platforms

Click any platform to jump to its step-by-step setup guide.

🔗
Dhru Fusion
GSM unlocking panel. Use "Other Fusion" server type for full integration.
✓ Fully Supported
📱
GSMTheme
Mobile unlocking theme. Add as custom REST API provider.
✓ Fully Supported
🐘
PHP
cURL-based integration. Works with Laravel, CodeIgniter, or plain PHP.
Code Ready
🐍
Python
requests library. Works with Django, Flask, FastAPI or any Python script.
Code Ready
🌐
JavaScript
Fetch API. Works in any modern browser via a server-side proxy.
Code Ready
Node.js
axios or built-in https module. Works with Express, Fastify, or standalone.
Code Ready
03 · Platform Guide

Dhru Fusion

Complete step-by-step guide for integrating Apizu Tool inside your Dhru Fusion admin panel.

Server type is critical. You MUST select "Other Fusion" — not "Dhru Standard" or "Custom REST". Only "Other Fusion" uses the correct request format that Apizu Tool API expects.

Step-by-Step Setup

1
Log into Dhru Fusion Admin Panel

Go to your Dhru Fusion admin dashboard.

2
Navigate to API Management

Settings → API Servers → Inactivated

3
Find "Other Fusion" entry

Look for "Other Fusion 1", "Other Fusion 2", etc. Click to configure.

4
Set Server Type to "Other Fusion"

This is mandatory. Any other type will fail authentication.

5
Enter the connection details
API URL: https://apizutool.one/reseller-api/api.php

Username: your reseller email

API Key: your key from reseller panel
6
Click "Test Connection"

Your credit balance should appear immediately. If it fails, check the troubleshooting table below.

7
Save and Activate

Move the server from Inactivated to Active list.

What Dhru Fusion Sends (exact request)

HTTP POST — FORM ENCODED
POST https://apizutool.one/reseller-api/api.php
Content-Type: application/x-www-form-urlencoded

action=accountinfo&username=reseller@email.com&apiaccesskey=YOUR_KEY

Required Response Format

JSON — Dhru Fusion reads this exactly
{
  "SUCCESS": [{
    "message": "Your Account Info",
    "AccoutInfo": {
      "credit":   150,
      "mail":     "reseller@email.com",
      "currency": "USD",
      "balance":  150
    }
  }]
}

"AccoutInfo" (one "n") is the official Dhru Fusion standard typo. Your API already returns it correctly.

Troubleshooting

Error MessageCauseFix
Authentication FailedWrong API key or emailDouble-check both fields match your database exactly
Connection timeoutWrong URLURL must include https:// and full path
Balance shows 0Email mismatchEmail in reseller_api_keys must match resellar table
Invalid JSONPHP warning in outputAdd error_reporting(0) at top of api.php
Wrong server typeUsed wrong Fusion typeMust use "Other Fusion" — not "Dhru" or "Custom"

GSMTheme

Add Apizu Tool as a custom REST API provider in your GSMTheme admin panel.

1
Open GSMTheme Admin Panel
2
Go to API Providers → Add New Provider
3
Set API URL
https://apizutool.one/reseller-api/api.php
4
Set authentication: API Key parameter
Parameter name: apiaccesskey

Value: YOUR_API_KEY
5
Map actions to your services

balance → action=balance  ·  recharge → action=recharge

6
Save and test the connection
GSMTheme recharge call
POST https://apizutool.one/reseller-api/api.php

action=recharge&apiaccesskey=YOUR_KEY&email=client@example.com&credits=25

Custom Panel

Building your own reseller panel or admin dashboard? Follow these rules to connect correctly.

1
Always use POST method

Send all requests as HTTP POST with Content-Type: application/x-www-form-urlencoded

2
Include action and apiaccesskey in every request

These two fields are required for all API calls

3
Parse the JSON response

Check the "status" field — "success" means it worked, "error" means it failed

4
Handle errors gracefully

Check HTTP status code and the "message" field in the response for error details

5
Respect the rate limit

Maximum 60 requests per minute per API key

04 · Code Examples

All Languages

Copy-paste ready code for every major language. Every example covers all 5 API actions.

PHP — Complete Integration

Works with plain PHP, Laravel, CodeIgniter, WordPress, or any PHP project. Requires the cURL extension (enabled by default on most servers).

Step 1 — Create the helper function

PHP — apizu.php
<?php
// ── Apizu Tool API Helper ─────────────────────────────────────
define('APIZU_URL', 'https://apizutool.one/reseller-api/api.php');
define('APIZU_KEY', 'YOUR_API_KEY'); // ← Replace with your key

function apizu($action, $params = []) {
    $body = http_build_query(array_merge([
        'action'       => $action,
        'apiaccesskey' => APIZU_KEY,
    ], $params));

    $ch = curl_init();
    curl_setopt_array($ch, [
        CURLOPT_URL            => APIZU_URL,
        CURLOPT_POST           => true,
        CURLOPT_POSTFIELDS     => $body,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT        => 15,
        CURLOPT_SSL_VERIFYPEER => true,
        CURLOPT_HTTPHEADER     => ['Content-Type: application/x-www-form-urlencoded'],
    ]);

    $response = curl_exec($ch);
    $error    = curl_error($ch);
    curl_close($ch);

    if ($error) return ['status' => 'error', 'message' => $error];
    return json_decode($response, true);
}

Step 2 — Use all 5 actions

PHP — All Actions
// ── 1. accountinfo (Dhru Fusion test connection) ──────────────
$info = apizu('accountinfo');
echo $info['SUCCESS'][0]['AccoutInfo']['credit']; // 150

// ── 2. balance ────────────────────────────────────────────────
$bal = apizu('balance');
echo 'Credits: ' . $bal['data']['credits'];
echo 'Clients: ' . $bal['data']['total_clients'];

// ── 3. check_client ───────────────────────────────────────────
$client = apizu('check_client', ['email' => 'client@example.com']);
if ($client['data']['found']) {
    echo 'License active: ' . ($client['data']['license_active'] ? 'Yes' : 'No');
    echo 'Expires: '        . $client['data']['license_expires'];
    echo 'Days left: '      . $client['data']['days_remaining'];
}

// ── 4. recharge ── 25=3mo · 35=6mo · 50=1yr ──────────────────
$result = apizu('recharge', [
    'email'   => 'client@example.com',
    'credits' => 25,
]);
if ($result['status'] === 'success') {
    echo 'License until: ' . $result['data']['license_end'];
    echo 'Your balance: '  . $result['data']['agent_balance'];
} else {
    echo 'Error: ' . $result['message'];
}

// ── 5. history (paginated) ────────────────────────────────────
$history = apizu('history', ['page' => 1, 'limit' => 20]);
echo 'Total: ' . $history['data']['total'];
foreach ($history['data']['records'] as $row) {
    echo $row['client'] . ' — ' . $row['amount'] . ' — ' . $row['date'];
}

Python — Complete Integration

Works with plain Python scripts, Django, Flask, FastAPI, or any Python project. Install the requests library: pip install requests

Step 1 — Install and setup

TERMINAL
pip install requests

Step 2 — Create the helper

Python — apizu.py
import requests
from typing import Any, Dict

# ── Apizu Tool API Helper ─────────────────────────────────────
APIZU_URL = "https://apizutool.one/reseller-api/api.php"
APIZU_KEY = "YOUR_API_KEY"  # ← Replace with your key

def apizu(action: str, **params) -> Dict[str, Any]:
    """Call the Apizu Tool API. Returns parsed JSON response."""
    data = {"action": action, "apiaccesskey": APIZU_KEY, **params}
    try:
        response = requests.post(APIZU_URL, data=data, timeout=15)
        response.raise_for_status()
        return response.json()
    except requests.exceptions.RequestException as e:
        return {"status": "error", "message": str(e)}

Step 3 — Use all 5 actions

Python — All Actions
# ── 1. accountinfo (Dhru Fusion test connection) ──────────────
info = apizu("accountinfo")
print(info["SUCCESS"][0]["AccoutInfo"]["credit"])

# ── 2. balance ────────────────────────────────────────────────
bal = apizu("balance")
print(f"Credits: {bal['data']['credits']}")
print(f"Total clients: {bal['data']['total_clients']}")

# ── 3. check_client ───────────────────────────────────────────
client = apizu("check_client", email="client@example.com")
if client["data"]["found"]:
    print(f"Active: {client['data']['license_active']}")
    print(f"Expires: {client['data']['license_expires']}")
    print(f"Days left: {client['data']['days_remaining']}")

# ── 4. recharge ── 25=3mo · 35=6mo · 50=1yr ──────────────────
result = apizu("recharge", email="client@example.com", credits=25)
if result["status"] == "success":
    print(f"License until: {result['data']['license_end']}")
    print(f"Your balance: {result['data']['agent_balance']}")
else:
    print(f"Error: {result['message']}")

# ── 5. history (paginated) ────────────────────────────────────
history = apizu("history", page=1, limit=20)
print(f"Total: {history['data']['total']}")
for row in history["data"]["records"]:
    print(f"{row['client']} — {row['amount']} — {row['date']}")

JavaScript — Browser Integration

Important: You cannot call the API directly from the browser due to CORS. You need a server-side proxy (proxy.php or your own backend). The code below calls your proxy, which calls the API.

Step 1 — Upload proxy.php to your server

Download proxy.php from this package and upload it to your server. It handles the CORS issue by calling the API server-side.

Step 2 — Create the API client

JavaScript — apizu.js
// ── Apizu Tool API Client (browser, via proxy) ────────────────
const APIZU_KEY  = 'YOUR_API_KEY'; // ← Replace
const PROXY_URL = '/proxy.php';    // path to your proxy.php

async function apizu(action, params = {}) {
    const body = new URLSearchParams({
        action, api_key: APIZU_KEY, ...params
    });
    const res = await fetch(PROXY_URL, {
        method: 'POST',
        headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
        body: body.toString()
    });
    if (!res.ok) throw new Error(`HTTP ${res.status}`);
    return res.json();
}

Step 3 — Use all 5 actions

JavaScript — All Actions
// ── 1. accountinfo ────────────────────────────────────────────
const info = await apizu('accountinfo');
console.log(info.SUCCESS[0].AccoutInfo.credit);

// ── 2. balance ────────────────────────────────────────────────
const bal = await apizu('balance');
console.log(`Credits: ${bal.data.credits}`);

// ── 3. check_client ───────────────────────────────────────────
const client = await apizu('check_client', { email: 'client@example.com' });
if (client.data.found) {
    console.log(`Expires: ${client.data.license_expires}`);
    console.log(`Days left: ${client.data.days_remaining}`);
}

// ── 4. recharge ── 25=3mo · 35=6mo · 50=1yr ──────────────────
const result = await apizu('recharge', { email: 'client@example.com', credits: 25 });
if (result.status === 'success') {
    console.log(`License until: ${result.data.license_end}`);
} else {
    console.error(`Error: ${result.message}`);
}

// ── 5. history (paginated) ────────────────────────────────────
const history = await apizu('history', { page: 1, limit: 20 });
history.data.records.forEach(row =>
    console.log(`${row.client} — ${row.amount} — ${row.date}`)
);

Node.js — Complete Integration

Works with Express, Fastify, NestJS, or any Node.js project. We show two options: axios (recommended) and the built-in https module (no install needed).

Option A — Using axios (recommended)

TERMINAL
npm install axios
Node.js — apizu.js (axios)
const axios = require('axios');
const qs    = require('querystring');

const APIZU_URL = 'https://apizutool.one/reseller-api/api.php';
const APIZU_KEY = 'YOUR_API_KEY'; // ← Replace

async function apizu(action, params = {}) {
    const { data } = await axios.post(APIZU_URL,
        qs.stringify({ action, apiaccesskey: APIZU_KEY, ...params }),
        { headers: { 'Content-Type': 'application/x-www-form-urlencoded' }, timeout: 15000 }
    );
    return data;
}

(async () => {
    const info = await apizu('accountinfo');
    console.log('Credits:', info.SUCCESS[0].AccoutInfo.credit);

    const bal = await apizu('balance');
    console.log('Credits:', bal.data.credits);

    const c = await apizu('check_client', { email: 'client@example.com' });
    if (c.data.found) console.log('Expires:', c.data.license_expires);

    const r = await apizu('recharge', { email: 'client@example.com', credits: 25 });
    if (r.status === 'success') console.log('License until:', r.data.license_end);

    const h = await apizu('history', { page: 1, limit: 20 });
    console.log('Total records:', h.data.total);
})();

Option B — Built-in https module (no install)

Node.js — No dependencies
const https = require('https');
const qs    = require('querystring');
const APIZU_KEY = 'YOUR_API_KEY';

function apizu(action, params = {}) {
    return new Promise((resolve, reject) => {
        const body = qs.stringify({ action, apiaccesskey: APIZU_KEY, ...params });
        const req = https.request({
            hostname: 'apizutool.one',
            path:     '/reseller-api/api.php',
            method:   'POST',
            headers:  {
                'Content-Type':   'application/x-www-form-urlencoded',
                'Content-Length': Buffer.byteLength(body)
            }
        }, res => {
            let data = '';
            res.on('data', chunk => data += chunk);
            res.on('end', () => resolve(JSON.parse(data)));
        });
        req.on('error', reject);
        req.write(body);
        req.end();
    });
}
// Usage — same as axios version above

cURL — Command Line & Postman

Use cURL for testing from terminal, or import these into Postman by pasting the URL and copying the body fields.

1. accountinfo (Dhru Fusion test)

cURL
curl -X POST https://apizutool.one/reseller-api/api.php \
  -d "action=accountinfo" \
  -d "apiaccesskey=YOUR_API_KEY" \
  -d "username=reseller@email.com"

2. balance

cURL
curl -X POST https://apizutool.one/reseller-api/api.php \
  -d "action=balance" \
  -d "apiaccesskey=YOUR_API_KEY"

3. check_client

cURL
curl -X POST https://apizutool.one/reseller-api/api.php \
  -d "action=check_client" \
  -d "apiaccesskey=YOUR_API_KEY" \
  -d "email=client@example.com"

4. recharge

cURL
curl -X POST https://apizutool.one/reseller-api/api.php \
  -d "action=recharge" \
  -d "apiaccesskey=YOUR_API_KEY" \
  -d "email=client@example.com" \
  -d "credits=25"

5. history

cURL
curl -X POST https://apizutool.one/reseller-api/api.php \
  -d "action=history" \
  -d "apiaccesskey=YOUR_API_KEY" \
  -d "page=1" \
  -d "limit=20"

Postman Setup

FieldValue
MethodPOST
URLhttps://apizutool.one/reseller-api/api.php
Body → typex-www-form-urlencoded
Key: actionaccountinfo / balance / recharge / check_client / history
Key: apiaccesskeyYOUR_API_KEY
05 · API Reference

All 5 Actions

Complete parameter reference for every API action.

POSTaccountinfoDhru Fusion test connection
ParamTypeReqDescription
actionstringYESMust be: accountinfo
apiaccesskeystringYESYour API key
usernamestringNOReseller email — sent automatically by Dhru Fusion
POSTbalanceCredits + statistics
ParamTypeReqDescription
actionstringYESMust be: balance
apiaccesskeystringYESYour API key
RESPONSE
{ "data": { "credits":150, "total_clients":15, "recharges_today":3, "requests_today":12 }}
POSTcheck_clientClient license status
ParamTypeReqDescription
actionstringYESMust be: check_client
apiaccesskeystringYESYour API key
emailstringYESClient email address to look up
RESPONSE — CLIENT FOUND
{ "data": {
  "found":true, "email":"client@example.com",
  "license_active":true, "license_expires":"2026-07-10", "days_remaining":91
}}
POSTrechargeCreate license · deduct credits

Real transaction. Credits deducted immediately. Cannot be undone.

ParamTypeReqDescription
actionstringYESMust be: recharge
apiaccesskeystringYESYour API key
emailstringYESClient email to recharge
creditsintegerYES25 = 3 months · 35 = 6 months · 50 = 1 year
GEThistoryPaginated recharge records
ParamTypeReqDescription
actionstringYESMust be: history
apiaccesskeystringYESYour API key
pageintegerNOPage number (default: 1)
limitintegerNORecords per page, max 100 (default: 20)
06 · Reference

Status Codes

200Success — request processed correctly
400Bad request — missing or invalid parameter
401Unauthorized — invalid or missing API key
402Insufficient credits — cannot complete recharge
403Forbidden — this API key has been deactivated
404Not found — client or reseller does not exist
429Too many requests — 60 per minute limit exceeded
500Server error — transaction failed internally

Error Format

All errors return structured JSON. Auth errors use Dhru Fusion format.

Standard error (400 / 402 / 404 / 429 / 500)
{ "status":"error", "message":"Description here", "timestamp":"2026-04-10 14:00:00" }
Auth error — Dhru Fusion format (401 / 403)
{ "ERROR": [{ "MESSAGE": "Authentication Failed" }] }