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.
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)
Content-Type: application/x-www-form-urlencoded action=balance&apiaccesskey=YOUR_API_KEY
Method 2 — X-API-Key header (for REST clients)
X-API-Key: YOUR_API_KEY
Method 3 — Authorization Bearer (for apps)
Authorization: Bearer YOUR_API_KEY
All Platforms
Click any platform to jump to its step-by-step setup 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
Go to your Dhru Fusion admin dashboard.
Settings → API Servers → Inactivated
Look for "Other Fusion 1", "Other Fusion 2", etc. Click to configure.
This is mandatory. Any other type will fail authentication.
Your credit balance should appear immediately. If it fails, check the troubleshooting table below.
Move the server from Inactivated to Active list.
What Dhru Fusion Sends (exact request)
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
{
"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 Message | Cause | Fix |
|---|---|---|
| Authentication Failed | Wrong API key or email | Double-check both fields match your database exactly |
| Connection timeout | Wrong URL | URL must include https:// and full path |
| Balance shows 0 | Email mismatch | Email in reseller_api_keys must match resellar table |
| Invalid JSON | PHP warning in output | Add error_reporting(0) at top of api.php |
| Wrong server type | Used wrong Fusion type | Must use "Other Fusion" — not "Dhru" or "Custom" |
GSMTheme
Add Apizu Tool as a custom REST API provider in your GSMTheme admin panel.
balance → action=balance · recharge → action=recharge
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.
Send all requests as HTTP POST with Content-Type: application/x-www-form-urlencoded
These two fields are required for all API calls
Check the "status" field — "success" means it worked, "error" means it failed
Check HTTP status code and the "message" field in the response for error details
Maximum 60 requests per minute per API key
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 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
// ── 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
pip install requests
Step 2 — Create the helper
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
# ── 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
// ── 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
// ── 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)
npm install 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)
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 -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 -X POST https://apizutool.one/reseller-api/api.php \ -d "action=balance" \ -d "apiaccesskey=YOUR_API_KEY"
3. check_client
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 -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 -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
| Field | Value |
|---|---|
| Method | POST |
| URL | https://apizutool.one/reseller-api/api.php |
| Body → type | x-www-form-urlencoded |
| Key: action | accountinfo / balance / recharge / check_client / history |
| Key: apiaccesskey | YOUR_API_KEY |
All 5 Actions
Complete parameter reference for every API action.
| Param | Type | Req | Description |
|---|---|---|---|
| action | string | YES | Must be: accountinfo |
| apiaccesskey | string | YES | Your API key |
| username | string | NO | Reseller email — sent automatically by Dhru Fusion |
| Param | Type | Req | Description |
|---|---|---|---|
| action | string | YES | Must be: balance |
| apiaccesskey | string | YES | Your API key |
{ "data": { "credits":150, "total_clients":15, "recharges_today":3, "requests_today":12 }}
| Param | Type | Req | Description |
|---|---|---|---|
| action | string | YES | Must be: check_client |
| apiaccesskey | string | YES | Your API key |
| string | YES | Client email address to look up |
{ "data": {
"found":true, "email":"client@example.com",
"license_active":true, "license_expires":"2026-07-10", "days_remaining":91
}}
Real transaction. Credits deducted immediately. Cannot be undone.
| Param | Type | Req | Description |
|---|---|---|---|
| action | string | YES | Must be: recharge |
| apiaccesskey | string | YES | Your API key |
| string | YES | Client email to recharge | |
| credits | integer | YES | 25 = 3 months · 35 = 6 months · 50 = 1 year |
| Param | Type | Req | Description |
|---|---|---|---|
| action | string | YES | Must be: history |
| apiaccesskey | string | YES | Your API key |
| page | integer | NO | Page number (default: 1) |
| limit | integer | NO | Records per page, max 100 (default: 20) |
Status Codes
Error Format
All errors return structured JSON. Auth errors use Dhru Fusion format.
{ "status":"error", "message":"Description here", "timestamp":"2026-04-10 14:00:00" }
{ "ERROR": [{ "MESSAGE": "Authentication Failed" }] }