The OTP API

Resend a WhatsApp code through the API: when, and what it costs

The reference for the resend address of ArabyBot's OTP API: the single field, the response, what every resend costs, and the refusals.

3 min read Updated 16 November 2026 ArabyBot team
The ArabyBot teamOfficial Meta partner · written from our own platform data
On this page 7
  1. The address and authentication
  2. The fields
  3. An example request
  4. The response
  5. The refusals
  6. The limits
  7. Frequently asked questions

The short answer

With a POST request to the resend address carrying the same request id. A fresh code is sent for the existing request under the same rate limits as send, and the response returns the new validity. Every resend is a new billed WhatsApp message, so make the «resend» button appear after a delay.

Also asked as: «اعادة ارسال كود التحقق واتساب» · «الكود موصلش على الواتساب» · «resend whatsapp otp code api»

The address and authentication

POST https://app.arabybot.com/wa_otp_api/resend

Send the OTP app's public key in the header X-Public-Key: ab_otp_…. You create the app in the OTP section of the dashboard, which gives you the public key and a secret shown once. If you switched request signing on for the app, add the header X-Signature: sha256=…, an HMAC-SHA256 of the raw request body keyed with the app secret.

The fields

  • request_id (required) The request id returned by the first send.

An example request

cURL

curl -X POST https://app.arabybot.com/wa_otp_api/resend \
  -H "X-Public-Key: ab_otp_YOUR_PUBLIC_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "request_id": "3f6c2a9e-41b7-4c0d-9a51-7e2b8d4f1c60" }'

PHP

$ch = curl_init('https://app.arabybot.com/wa_otp_api/resend');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => ['X-Public-Key: ab_otp_YOUR_PUBLIC_KEY', 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS     => json_encode([
        'request_id' => '3f6c2a9e-41b7-4c0d-9a51-7e2b8d4f1c60',
    ]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);

Python

import requests

r = requests.post(
    'https://app.arabybot.com/wa_otp_api/resend',
    headers={
        "X-Public-Key": "ab_otp_YOUR_PUBLIC_KEY",
    },
    json={
        "request_id": "3f6c2a9e-41b7-4c0d-9a51-7e2b8d4f1c60",
    },
    timeout=30,
)
print(r.status_code, r.json())

Node.js

// Node.js 18+
const r = await fetch('https://app.arabybot.com/wa_otp_api/resend', {
  method: 'POST',
  headers: {"X-Public-Key": "ab_otp_YOUR_PUBLIC_KEY", "Content-Type": "application/json"},
  body: JSON.stringify({
    "request_id": "3f6c2a9e-41b7-4c0d-9a51-7e2b8d4f1c60"
  }),
});
console.log(r.status, await r.json());

The response

200
{ "success": true, "request_id": "3f6c2a9e-41b7-4c0d-9a51-7e2b8d4f1c60",
  "expires_in": 300, "expires_at": "2026-11-16 18:14:10" }
  • The response has the same shape as the send response.
ArabyBot's API as it runs today, read from the system itselfmeasured 16 November 2026

The refusals

Every refusal comes back as JSON with "success": false, an error_code and a message, plus retry_after in seconds when the cause is a rate limit:

  • 404 not_found: No request with this id.
  • 422 missing_request_id: The request id is missing.
  • 429: A rate limit; wait retry_after seconds.
  • 401 missing_key / invalid_key: The public key is missing or wrong.
  • 401 missing_signature / bad_signature: The app requires request signing and the signature is missing or does not match.

The limits

Every code is a paid WhatsApp message at Meta's authentication rate for the recipient's country. For protection there are limits on requests per phone number and per app, per minute and per day; passing them returns status 429 with retry_after in seconds.

The OTP API guide · All APIs for developers

Frequently asked questions

1

Is a resend free?

No. Every resend is a new WhatsApp message at Meta's authentication rate. That is why it has the same rate limits as send.

2

When do I show the «resend» button to the user?

After a delay, not at once. And if the request returns status 429, show the user the time in retry_after before they try again.

The ArabyBot teamOfficial Meta business partner in the Middle East 264 guides Figures from our platform All guides

How we write these guides Figures come from our platform and Meta's actual invoices, dated with their sample; we describe what works today, not what we plan, and say what we do not do and when someone else is the better choice. Reviewed by the ArabyBot team on 16 November 2026.

Share this guide

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.

And you run all of it from your phoneEverything on this page is also run from the ArabyBot mobile app — replies, orders, campaigns and AI reports. Not a web dashboard only.