Check the send API key and see the WhatsApp numbers behind it
The reference for the key check address of ArabyBot's API: what the response returns, the default number, and the key refusals.
On this page 6
The short answer
With a GET request to the me address. The response returns the key's name and the WhatsApp numbers connected to the account, and which is the default number messages leave from when you name none. It is the first request to try after creating the key, because it sends nothing and costs nothing.
Also asked as: «اختبر مفتاح الواتساب api ازاي» · «مفتاح واتساب api مش شغال» · «how to test my whatsapp api key»
The address and authentication
GET https://app.arabybot.com/api/v1/me
Send the send key in the header Authorization: Bearer abk_… or X-Api-Key. You create the key on the «Developer tools» page of the ArabyBot dashboard, and it is shown once when it is made. The call goes from your server, so never put the key in a page a visitor opens or in a mobile app.
An example request
cURL
curl https://app.arabybot.com/api/v1/me \ -H "Authorization: Bearer abk_YOUR_KEY"
PHP
$ch = curl_init('https://app.arabybot.com/api/v1/me');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer abk_YOUR_KEY'],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch); Python
import requests
r = requests.get(
'https://app.arabybot.com/api/v1/me',
headers={
"Authorization": "Bearer abk_YOUR_KEY",
},
timeout=30,
)
print(r.status_code, r.json()) Node.js
// Node.js 18+
const r = await fetch('https://app.arabybot.com/api/v1/me', {
headers: {"Authorization": "Bearer abk_YOUR_KEY"},
});
console.log(r.status, await r.json());
The response
200
{ "success": true, "key": "my-server",
"numbers": [ { "number": "966501234567", "name": "My Shop", "default": true } ] } keyis the name you gave the key when you created it.numbersare the WhatsApp numbers connected to the account; the one with"default": trueis where messages leave from when you send nofromfield.
The refusals
Every refusal comes back as JSON with "success": false, an error_code, and a message in Arabic in message and in English in message_en:
- 401
NO_KEY: The key was not sent in the header. - 401
INVALID_KEY: The key is wrong or was revoked; create one under «Developer tools». - 402
SUBSCRIPTION_EXPIRED: The account's subscription has ended. - 403
NOT_IN_PLAN: The account's plan does not include «Developer tools». - 429: The key passed 600 requests a minute; wait the time written in the
Retry-Afterheader. - 500
SERVER: A failure on our side; try again, and tell support if it repeats.
The limits
600 requests a minute per key. Whatever exceeds the pace WhatsApp accepts for your number waits in a queue, comes back with the status queued, then goes out by itself, so no message is lost. Meta's own limits on your number, how many people you may start conversations with in a day and the quality rating, stay as they are behind this API.
The full send API reference · All APIs for developers
Frequently asked questions
Where do I get the send API key?
From the «Developer tools» page in the ArabyBot dashboard. The key starts with abk_ and is shown once when it is made, because we keep only its fingerprint. If it is lost, revoke it and make another.
Does the same key work for the OTP API or the store API?
No. Each API has its own key: the send key starts with abk_, an OTP app has a public key starting with ab_otp_, and the store key starts with abst_.
Read next
Try the agent before you pay anything
The agent that will answer your customers is the one answering you now: ask it from the chat button here or on WhatsApp. Your account is free with no credit card, and the free trial on your own number or page is activated after you contact our team on customer-service WhatsApp.