Getting started
Check credentials API
Use this API to validate your credentials before making other API calls. It confirms that your client_id and api_key work together and, optionally, that a WhatsApp number ID belongs to your workspace. It doesn't send anything or use any credits.
https://wbiztool.com/api/v1/me/Body: JSON or form fields
Quick example#
curl -X POST https://wbiztool.com/api/v1/me/ \
-H "Content-Type: application/json" \
-d '{
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"whatsapp_client": 678
}'import requests
response = requests.post(
"https://wbiztool.com/api/v1/me/",
json={
"client_id": 12345,
"api_key": "YOUR_API_KEY",
"whatsapp_client": 678,
},
timeout=30,
)
result = response.json() # read the body even when the HTTP code is 400 or 403
if result["status"] == 1:
print("Credentials OK for", result["name"])
else:
print("Failed:", result["message"])// Node.js 18+ (built-in fetch). Save as .mjs to use top-level await.
const response = await fetch("https://wbiztool.com/api/v1/me/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
client_id: 12345,
api_key: "YOUR_API_KEY",
whatsapp_client: 678,
}),
});
const result = await response.json(); // read the body even when the HTTP code is 400 or 403
if (result.status === 1) {
console.log("Credentials OK for", result.name);
} else {
console.error("Failed:", result.message);
}<?php
$payload = [
'client_id' => 12345,
'api_key' => 'YOUR_API_KEY',
'whatsapp_client' => 678,
];
$ch = curl_init('https://wbiztool.com/api/v1/me/');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Content-Type: application/json'],
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$result = json_decode(curl_exec($ch), true);
curl_close($ch);
if (($result['status'] ?? 0) === 1) {
echo 'Credentials OK for ' . $result['name'];
} else {
echo 'Failed: ' . ($result['message'] ?? 'no response');
}Replace 12345, YOUR_API_KEY and 678 with your own values. Leave out whatsapp_client if you only want to test the key. See Authentication for where to find them.
Request parameters#
client_idintegerrequiredYour API Client ID from Settings → API keys.
api_keystringrequiredYour API key from the same page.
whatsapp_clientintegeroptionalID of one of your WhatsApp numbers, from WhatsApp settings. Send it to also check that the ID belongs to the workspace of this API key. A number you deleted from the dashboard still passes this check. It only checks the ID; it doesn't tell you whether the number is connected. Use Connection status for that.
Response#
A successful request returns HTTP 200:
{
"status": 1,
"message": "Okay",
"name": "[email protected] - 919876543210"
}
| Field | Type | Description |
|---|---|---|
status | integer | 1 if the credentials are valid, 0 if not. |
message | string | Okay on success, otherwise the error. |
name | string | The username of the person who created the workspace. If you sent whatsapp_client, the number's phone is added after -. Only present on success. |
Errors#
Every failure on this endpoint returns HTTP 400, except a non-numeric client_id, which returns HTTP 403. The body always has status set to 0:
{ "status": 0, "message": "Auth Error: invalid api key" }
| Message | How to fix it |
|---|---|
Auth Error | Send both client_id and api_key in a POST body, as valid JSON or form fields. This message also appears when whatsapp_client isn't a number. |
Invalid Client Id | Send client_id as a whole number, such as 12345. |
Auth Error: invalid api key | Check the key exists, hasn't been deleted and belongs to this client_id. |
Invalid WhatsApp Client ID | That whatsapp_client ID isn't in the workspace of this API key. Copy the ID from WhatsApp settings. |
Checking the API is up#
/api/v1/status/ is a simple liveness check. It needs no credentials, accepts any method and always returns:
{ "status": 200, "data": {} }
It only tells you the API is reachable. It doesn't check your credentials or whether your WhatsApp number is connected.
curl https://wbiztool.com/api/v1/status/
The Python client's health_check() calls this endpoint.
Tips#
- Check once at setup: call this endpoint when a user saves their credentials in your app, rather than before every message. A successful check doesn't mean you can send: it doesn't look at your remaining credits or whether your number is connected.
- Read the body on errors: failures come back as HTTP
400or403, so make sure your HTTP client still parses the JSON body. - Deleted keys stop working immediately: if a key was deleted on the API keys page, you'll get
Auth Error: invalid api key. - Next step: once your credentials work, send a message.
