WhatsApp Accounts API

Manage multiple WhatsApp accounts, check status overview, and optimize account usage across your organization

End Point: https://wbiztool.com/api/v1/whatsapp/accounts/
Request Type: POST
Required Fields in Request
  • client_id (Integer) - Your Client Id (Given on API Keys page)
  • api_key (String) - Your API Key (Given on API Keys page)
Fields in Response
  • status (Integer) - 1 if successful, 0 if error
  • whatsapp_clients (Array) - Array of WhatsApp client objects, each containing:
    • whatsapp_client_id (Integer) - WhatsApp client ID
    • whatsapp_number (String) - Associated WhatsApp number
    • status (String) - "connected" if active, "not_connected" if inactive
Example

Use this API to get a complete list of all your WhatsApp client accounts and their connection status.

curl -X POST https://wbiztool.com/api/v1/whatsapp/accounts/  -d '{
    "client_id": "client_id",
    "api_key": "api_key"
}'

// Response
{
    "status": 1,
    "whatsapp_clients": [
        {
            "whatsapp_client_id": 123,
            "whatsapp_number": "919876543210",
            "status": "connected"
        },
        {
            "whatsapp_client_id": 124,
            "whatsapp_number": "919876543211",
            "status": "not_connected"
        }
    ]
}

Get All WhatsApp Accounts with Python

Use our official Python package: We recommend using our official Python client for easier integration.
Install it with: pip install wbiztool-client
import requests

data = {
    "client_id": "client_id",
    "api_key": "api_key"
}

url = 'https://wbiztool.com/api/v1/whatsapp/accounts/'
response = requests.post(url, data=data)
result = response.json()

if result['status'] == 1:
    print("WhatsApp Accounts:")
    for client in result['whatsapp_clients']:
        print(f"ID: {client['whatsapp_client_id']}")
        print(f"Number: {client['whatsapp_number']}")
        print(f"Status: {client['status']}")
        print("---")
else:
    print(f"Error: {result.get('message', 'Unknown error')}")

Get All WhatsApp Accounts with PHP

$url = 'https://wbiztool.com/api/v1/whatsapp/accounts/';
$data = 'client_id=client_id&api_key=api_key';

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

$response = curl_exec($ch);
$result = json_decode($response, true);

if ($result['status'] == 1) {
    echo "WhatsApp Accounts:\n";
    foreach ($result['whatsapp_clients'] as $client) {
        echo "ID: " . $client['whatsapp_client_id'] . "\n";
        echo "Number: " . $client['whatsapp_number'] . "\n";
        echo "Status: " . $client['status'] . "\n";
        echo "---\n";
    }
} else {
    echo "Error: " . (isset($result['message']) ? $result['message'] : 'Unknown error') . "\n";
}

curl_close($ch);

Get All WhatsApp Accounts with Node.js

Use our official Node.js package: We recommend using our official Node.js client for easier integration.
Install it with: npm install wbiztool-client
const request = require('request');

const data = {
    client_id: "client_id",
    api_key: "api_key"
};

const options = {
    url: 'https://wbiztool.com/api/v1/whatsapp/accounts/',
    method: 'POST',
    form: data
};

request(options, (error, response, body) => {
    if (!error && response.statusCode === 200) {
        const result = JSON.parse(body);
        if (result.status === 1) {
            console.log("WhatsApp Accounts:");
            result.whatsapp_clients.forEach(client => {
                console.log(`ID: ${client.whatsapp_client_id}`);
                console.log(`Number: ${client.whatsapp_number}`);
                console.log(`Status: ${client.status}`);
                console.log("---");
            });
        } else {
            console.log(`Error: ${result.message || 'Unknown error'}`);
        }
    } else {
        console.log('Request failed:', error);
    }
});