Fast2SMS resend OTP errors: 10-minute window expired and 5-time limit reached

The Fast2SMS Resend OTP API has two fixed limits: it works only within 10 minutes of the last send, and one OTP can go out at most 5 times. When you cross them you get “OTP resend window (10 minutes) has expired” or “Maximum resend limit (5 times) reached”. In both cases the fix is to call Send OTP for a fresh code. This page covers these and the other Resend errors.

The exact errors

All come from /dev/otp/resend:

HTTP Message Meaning
400 OTP resend window (10 minutes) has expired. Please request a new OTP. More than 10 minutes have passed since the last send to this number.
400 Maximum resend limit (5 times) reached. Please try again later. This OTP was already sent 5 times in 10 minutes. The first send counts, so 4 resends are possible.
404 No previous OTP request found for this mobile Nothing was sent to this number with Send OTP.
400 OTP already verified. Please request a new OTP. The code was already used.
400 Mobile Number is required The mobile field is missing or not a valid 10-digit number.
400 Please wait N seconds before requesting a new OTP The resend wait time from OTP Settings has not passed.

Example body:

{"return":false,"status_code":400,"message":"Maximum resend limit (5 times) reached. Please try again later."}

How Resend works

  • Resend sends the same OTP again, with the same OTP ID and expiry as the last send to that number. It returns a new request_id.
  • Each resend is charged like a new send.
  • The 10-minute window and the 5-send limit are fixed. They are not in OTP Settings and cannot be changed.
  • Resend also runs every Send check, so it can return any Send error too, such as a balance or template error.

How to fix it

  1. Find the calls for that number

    Go to Account Setting, then API Logs, and search by the mobile number. Count the OTP/SEND and OTP/RESEND rows in the last 10 minutes and note the time of the first send.

    Fast2SMS API Logs list with OTP/SEND rows, their HTTP codes, IP addresses, responses and Success or Failed status
    API Logs shows each send and resend with its time.
  2. Call Send OTP for a new code

    For the window, limit and already-verified errors, call /dev/otp/send with the mobile and your OTP ID. This creates a new OTP and starts a fresh window. The old code stops working.

  3. Call Send first if there is no previous request

    For “No previous OTP request found”, your app called Resend before any Send for this number. Use Send for the first code.

Code check

async function resendOrNew(mobile) {
  const h = { "authorization": process.env.F2S_KEY, "Content-Type": "application/json" };
  let r = await fetch("https://www.fast2sms.com/dev/otp/resend",
    { method: "POST", headers: h, body: JSON.stringify({ mobile }) });
  let d = await r.json();
  if (d.return) return d;
  const msg = String(d.message || "");
  if (msg.startsWith("OTP resend window") || msg.startsWith("OTP already verified")
      || msg.startsWith("No previous OTP")) {
    r = await fetch("https://www.fast2sms.com/dev/otp/send",
      { method: "POST", headers: h, body: JSON.stringify({ mobile, otp_id: process.env.F2S_OTP_ID }) });
    return r.json();
  }
  return d; // limit reached or wait time: show the message, do not loop
}

Do not switch to Send automatically when the 5-send limit is reached. That limit is there to stop abuse. Ask the user to try again later.

How to avoid these errors

  • Hide the “Resend code” button after 4 resends and show “Try again later”.
  • After about 10 minutes, label the button “Send new code” and call Send instead of Resend.
  • Keep a countdown between resends that matches your OTP Settings wait time.
  • Check the wallet balance, because every resend is charged.

Frequently asked questions

Does Resend OTP send a new code?

No. It sends the same code again. To get a different code, call Send OTP.

How many times can I resend an OTP?

Up to 5 sends in 10 minutes, counting the first send. That means 4 resends.

Can I change the 10-minute resend window?

No. The window and the 5-send limit are fixed. You can change only the wait time between sends in OTP Settings.

Is every resend charged?

Yes. Each resend is a new message and is charged like a send.

What should my app show when the limit is reached?

A short message such as “Too many requests. Please try again later”, without a resend button.