Fast2SMS
Free ₹50 Credit After Signup

Smart OTP: SMS and
WhatsApp OTP API

One OTP API that sends on SMS or WhatsApp and falls back to the other on its own. OTP SMS in 1–2 seconds, WhatsApp OTP with a copy button, verify and resend built in. Pay the rate of the channel that delivered.

  • Delivery in 1–2 s
  • SMS ⇄ WhatsApp fallback
  • Channel-based pricing
  • ₹50 free credit, no monthly fee
1–2 secTypical OTP delivery
2 channelsSMS and WhatsApp, fallback both ways
4–10 digitsCode length, expiry up to 7 days
₹100Minimum recharge, no monthly fee
Why Smart OTP

Four things an OTP service should do, and usually doesn't

Sending a six-digit code is the easy part. Reaching the phone when the first channel fails, charging fairly for it, and keeping the integration to three calls is where providers fall short.

Fallback both ways: SMS ⇄ WhatsApp

Every OTP template has a primary channel and an optional fallback. Send on SMS and fall back to WhatsApp, or send on WhatsApp and fall back to SMS. The moment the first channel reports a failure, the fallback goes out on its own. You set it once in the panel, not in your code.

  • Primary and fallback set per template in Configure Channel Fallback
  • Fires automatically on a failed first attempt, no second API call
  • One OTP, one verify call, whichever channel delivered it

Channel-based pricing

You pay the rate of the channel that carried the OTP: your SMS rate for SMS, the WhatsApp authentication rate for WhatsApp. Each attempt appears as its own line in the OTP report and in your transaction history, so the bill is never a mystery.

  • SMS OTP at your bulk SMS rate, from ₹0.11
  • WhatsApp OTP at the authentication rate, ₹0.25
  • Every attempt itemised in transaction history

Send, verify, resend: three endpoints

Your app calls send with a mobile number and an OTP ID. Fast2SMS generates the code (or uses yours), picks the channel from the template, delivers it and stores it. Verify checks the code, resend repeats it. Status updates reach your server by webhook.

  • POST /dev/otp/send, /verify, /resend
  • Code length 4–10, expiry 1 min to 7 days, your own code allowed
  • Webhook with channel, status, time and your udf values
Read the OTP API docs

On the handset in 1–2 seconds

OTP SMS goes out on priority operator routes with your 6-letter DLT sender ID; WhatsApp OTPs arrive as an authentication template with a copy-code button. Our team helps register your DLT OTP template for free, so you are live in days, not weeks.

  • Priority routes on Airtel, Jio, Vi and BSNL
  • Free DLT support for your OTP sender ID and template
  • Attempt limits and resend waits you control in OTP Settings
Send → Fallback → Verified

What happens when the first channel fails

You make one call. Fast2SMS picks the primary channel from the template, watches the delivery receipt, and switches channels on a failure without a second request from you.

Inside the panel

Set the channel and its fallback once

Smart OTP lists your OTP templates with their channel, OTP ID and fallback. Add an SMS template from your approved DLT content, or a WhatsApp authentication template from your connected number. Open Configure Channel Fallback, pick the other channel's template, and the switch is live for every send.

  • SMS and WhatsApp templates in one list, filter by channel
  • Fallback entity, sender, WhatsApp number and template with a live preview
  • Test OTP to your own number from the same row
  • Sample code for send, verify and resend in your language
app.fast2sms.com / smart-otp
AllSMSWhatsApp+ Add OTP Template
OTP IDChannelTemplateFallback
4471SMSXY-DEMOAP · Login OTPWhatsAppTest OTP
4472WhatsAppDemo App · otp_auth_enSMSTest OTP
4473SMSXY-DEMOPY · Payment OTPSet fallbackTest OTP
Configure Channel Fallback Current OTP ID 4471 · SMS
Fallback OTP content preview WhatsApp · OTP mapped to variable 1
Fires only if the SMS attempt failsSave fallback
Inside the panel

Every attempt, every channel, in one report

The OTP report shows sent, delivered, failed and pending per attempt, with the channel that carried it and the time it landed. A fallback shows as its own line next to the primary attempt. Filter by date, search a number, export to Excel. The same lines appear as debits in transaction history.

  • Primary and fallback attempts side by side
  • Daily chart by channel
  • Status pushed to your webhook as it changes
  • Excel export of any date range
app.fast2sms.com / smart-otp / report
Sent8,940
Delivered8,812
Failed96
Fallback used74
MonTueWedThuFriSatSun
MobileChannelStatusTimeVerified
98765 4XXX1SMSDelivered10:42:03Yes
99887 7XXX2SMSFailed10:42:04—
99887 7XXX2WhatsAppDelivered10:42:06Yes
90001 2XXX5WhatsAppDelivered10:42:09Yes
93456 7XXX0SMSPending10:42:11—
Who sends what

Which order fits which OTP

Pick the channel your users already have open, and let the other one catch the misses. Sample messages below; your own templates go through DLT or WhatsApp approval.

App login

Users on every handset, with or without data. SMS lands on all of them; WhatsApp catches the few numbers an operator rejects.

482913 is your OTP to login to Fast2SMS. Valid for 10 minutes. Do not share it. -Team Fast2SMS
SMS first, WhatsApp fallback
Payment confirmation

The buyer is mid-checkout. A 1–2 second SMS keeps the flow moving; a failed attempt is retried on WhatsApp before they give up.

Use OTP 335021 to confirm payment of Rs.2,499 to Demo Store. Valid 5 min. -XY-DEMOPY
SMS first, WhatsApp fallback
Delivery at the door

Customers already chat with the store on WhatsApp, so the code arrives in that thread with a copy button; SMS backs it up.

WhatsApp first, SMS fallback
Account signup

New users who found you on WhatsApp verify there without leaving the chat. Numbers without WhatsApp get the SMS automatically.

WhatsApp first, SMS fallback
Password reset

A short expiry and a low attempt limit make sense here. Set expiry to 5 minutes and 3 attempts on the request and in OTP Settings.

Your password reset code is 918274. Expires in 5 min. Ignore if you did not request this. -XY-DEMOAP
SMS first, WhatsApp fallback
Banking transaction

Regulated flows want the SMS trail with a DLT sender ID. WhatsApp fallback keeps the customer moving when a handset is out of coverage.

OTP 668102 for transfer of Rs.25,000 to A/c XX4471. Do not share. -XY-DEMOFN
SMS first, WhatsApp fallback
OTP API

Send, verify, resend: three calls

The channel and fallback come from the OTP ID, so the same code works whether the OTP goes by SMS or WhatsApp. Snippets for PHP, Node, Python, Java and .NET are in the docs.

Send an OTPPOST
curl -X POST https://www.fast2sms.com/dev/otp/send \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9999999999","otp_id":"4471",
       "otp_length":6,"otp_expiry":10,
       "udf1":"login-7781"}'
Response
{
  "return": true,
  "status_code": 200,
  "request_id": "lwdtp7cjyqxvfe9",
  "message": "OTP sent successfully"
}
Verify the code the user typedPOST
curl -X POST https://www.fast2sms.com/dev/otp/verify \
  -H "Authorization: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"mobile":"9999999999","otp":"482913"}'

{ "return": true, "status_code": 200,
  "message": "OTP verified successfully" }
OTP webhook to your URL
{
  "request_id": "lwdtp7cjyqxvfe9",
  "mobile": "9999999999",
  "channel": "whatsapp",
  "category": "AUTHENTICATION",
  "status": "delivered",
  "sent_time": "2026-10-31 10:42:04",
  "delivery_time": "2026-10-31 10:42:06",
  "udf1": "login-7781"
}

Resend with POST /dev/otp/resend and the mobile number: up to 5 times within 10 minutes. A wrong or expired code returns status_code 400 with the reason.

Everything included

The rest of Smart OTP

No add-ons and no tiers. Every account gets the full OTP toolkit with its first ₹50 of credit.

Resend with a wait

Resend the same OTP up to 5 times in 10 minutes. Set a wait of 10 s to 1 hour between resends to the same number.

Your code or ours

Let Fast2SMS generate a 4 to 10 digit code, or pass your own in the request. Expiry from 1 minute up to 7 days.

Attempt limits

Choose how many wrong guesses a code allows, 1 to 100. After that the code is dead and verify says so.

Templates per channel

Pick an approved DLT content template for SMS and an approved Authentication template for WhatsApp, with the OTP mapped to a variable.

OTP webhooks

Delivered or failed, with channel, category, timestamps and your udf1–3, posted to your URL as JSON, form or XML.

OTP report and export

Sent, delivered, failed and pending per attempt, filtered by date, searchable by number, exported to Excel.

Transaction history

Every OTP attempt as a debit line with channel, date and amount, next to your recharges.

Test from the panel

Send a test OTP to your own number, watch the delivery status, and copy sample code in your language before you integrate.

Compare

Smart OTP vs a typical OTP service provider

What a free account here includes, against what many OTP providers charge extra for or leave to you.

What you get Fast2SMS Smart OTP Many providers
SMS and WhatsApp from one OTP API Both, same key and OTP ID Usually SMS only
Automatic fallback between channels SMS → WhatsApp or WhatsApp → SMS No, or a second API call from you
Price per OTP Rate of the channel that sent it Flat OTP rate, often higher than SMS
Verify and resend endpoints Included Verify often left to you
Per-attempt logs with reason Every attempt, both channels Summary counts
Setup or monthly fee None Often a platform fee
Minimum recharge ₹100 ₹1,000–₹5,000 packs
DLT help for OTP templates Free Paid or not offered
Support Chat, phone, email, meeting Email ticket

Based on publicly listed plans of common OTP and SMS providers in India; details vary by provider.

Pricing

Pay the rate of the channel that sent it

There is no separate OTP tariff. An OTP that goes by SMS costs your bulk SMS rate; one that goes by WhatsApp costs the WhatsApp authentication rate. When a fallback fires you see two lines, one per attempt. ₹50 free credit to start, recharge from ₹100, no setup or monthly fee.

  • OTP by SMS: from ₹0.11 per SMSYour bulk SMS slab rate, ₹0.25 down to ₹0.11 as your recharge grows.
  • OTP by WhatsApp: ₹0.25 per messageMeta's authentication category, with the copy-code button included.
  • Transparent transaction historyEach attempt is a line with channel, date and amount, next to your recharges.
  • No monthly or hidden costPrepaid, minimum recharge ₹100, one wallet for SMS, WhatsApp and OTP.
Data security

Your data is encrypted and stays yours

Your customers' numbers and messages are business data. We treat them that way: encrypted on the wire and in the database, visible only to the people you allow, on infrastructure that is audited every year.

See our certificates
  • Encrypted in transitEvery panel page and API call runs over HTTPS (TLS 1.2+). Your API key is sent in a header, never in a page.
  • Encrypted at restSensitive fields such as OTP codes, mobile numbers and logs are encrypted in our database, with keys kept outside the application.
  • Access you controlPer-user API keys you can rotate any time, IP allow-listing, OTP on login, and agents who see only what you assign.
  • Audited and certifiedISO 27001 and SOC 2 Type 2 certified, VAPT tested by an external team, MSME registered.
ISO 27001 certified SOC 2 Type 2 VAPT certified MSME registered
Support

Real people on chat, phone and email

Stuck on a DLT OTP template, a WhatsApp authentication template or a verify error? Ask in the panel chat, call us, or write in. For onboarding or volume pricing, book a call and we will set it up with you.

How it works

Live in three steps

  1. 1

    Create your free account

    Sign up with your mobile number. ₹50 credit is added so you can send test OTPs straight away.

  2. 2

    Add an OTP template and its fallback

    Under Smart OTP, add a template for SMS (DLT) or WhatsApp (authentication). Open Configure Channel Fallback and pick the other channel's template. Copy the OTP ID.

  3. 3

    Integrate send and verify

    Call /dev/otp/send with the mobile number and OTP ID, then /dev/otp/verify with the code the user types. Add a webhook URL if you want delivery events pushed to you.

FAQ

OTP SMS and WhatsApp OTP: questions answered

What is Smart OTP?

Smart OTP is the OTP service inside your Fast2SMS account. You create an OTP template, choose SMS or WhatsApp as its channel, optionally set the other channel as fallback, and get an OTP ID. Your website or app then calls one API to send a code, one to verify it and one to resend it. Fast2SMS generates the code, delivers it, stores it and checks it.

How does the SMS to WhatsApp fallback work?

Each OTP template has a primary channel and an optional fallback channel with its own template. If the primary attempt is reported as failed by the operator or by WhatsApp, Fast2SMS sends the same code on the fallback channel automatically, within about a minute and only for attempts less than two minutes old. It works in both directions: SMS first then WhatsApp, or WhatsApp first then SMS. Your code does not change; the user verifies the same OTP.

How is Smart OTP priced?

By channel. An OTP sent as SMS costs your bulk SMS rate, from ₹0.25 down to ₹0.11 per SMS depending on recharge. An OTP sent on WhatsApp costs the WhatsApp authentication rate of ₹0.25. If a fallback is used you see both attempts as separate lines in your transaction history. There is no setup fee and no monthly fee; you recharge from ₹100 and pay as you go.

How fast is OTP delivery?

OTP SMS goes on priority operator routes and normally reaches the handset in one to two seconds. WhatsApp OTPs arrive as soon as the phone is online. Each attempt in the OTP report shows the exact sent and delivered time.

Do I need DLT registration for OTP SMS?

Yes, for the SMS channel. OTP SMS in India needs a DLT-registered sender ID and a content template in the transactional category. Our team helps you register both for free, and templates already approved on the DLT portal are picked up in your panel automatically. WhatsApp OTPs need an approved authentication template on your WhatsApp Business account instead.

Can I send OTP on WhatsApp only?

Yes. Create the OTP template with WhatsApp as its channel and leave fallback empty, or set SMS as fallback so numbers without WhatsApp still get the code. WhatsApp OTPs use Meta's authentication template with a copy-code button and your verified business name.

Can I use my own OTP code?

Yes. Pass the otp parameter in the send request and Fast2SMS sends that code instead of generating one. You can still use the verify endpoint, or check it on your side. Generated codes can be 4 to 10 digits long; set otp_length on the request.

How long is an OTP valid and how many wrong attempts are allowed?

By default a code is valid for 15 minutes; set otp_expiry in minutes on each request, from 1 up to 10,080 (7 days). The number of wrong guesses allowed per code is set in OTP Settings, from 1 to 100. After the limit, verify returns "Maximum verification attempts reached" and the code is no longer valid.

What are the resend rules?

The resend endpoint sends the same code to the same number again, up to 5 times within 10 minutes of the first send. OTP Settings also lets you set a wait between resends to the same number on the same channel, from 0 to 3,600 seconds (default 10), to stop abuse and double charges.

What does the verify API return?

A JSON object with return true and "OTP verified successfully" when the code matches and is still valid. For a wrong, expired or exhausted code it returns return false with status_code 400 and the reason, and 404 when there is no pending OTP for that number or it was already verified.

Do I get delivery reports and webhooks for OTPs?

Yes. The OTP report in the panel lists every attempt with channel, status (sent, delivered, failed, pending), time and number, with a daily chart and Excel export. An OTP webhook posts the same data to your URL: request_id, mobile, channel, status, sent and delivery time, category and your udf1 to udf3 values.

Is Smart OTP suitable for two-factor authentication?

Yes. It is used for login 2FA, payment confirmation, password reset, signup verification and delivery OTPs. Short expiry, low attempt limits, resend waits and the fallback channel give you control over both security and reach.

Can I test before integrating?

Yes. Every OTP template has a Test OTP button in the panel. Enter your number, send, watch the delivery status and verify the code, all without writing code. The same screen shows sample code for the send, verify and resend APIs in several languages.

Which languages and frameworks can call the API?

Any that can make an HTTPS request: PHP, Node.js, Python, Java, .NET, Go, mobile apps and no-code tools. The send, verify and resend endpoints accept JSON and return JSON, and the docs include ready snippets.

Is there a monthly fee or a minimum volume?

No. Smart OTP is prepaid on the same wallet as your SMS and WhatsApp. Recharge from ₹100, pay per OTP sent, and see every debit in transaction history. For high volumes, contact sales or schedule a meeting for a custom rate.

How do I start?

Create a free account, add an OTP template under Smart OTP (SMS, WhatsApp or both with fallback), copy its OTP ID and call /dev/otp/send from your app. Use the ₹50 credit for your first tests, then recharge as you need.

Send your first OTP for FREE

₹50 free credit after signup. SMS and WhatsApp with fallback, pay as you go from ₹100.