{"id":18694,"date":"2026-11-19T00:10:10","date_gmt":"2026-11-18T18:40:10","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/"},"modified":"2026-11-19T00:50:15","modified_gmt":"2026-11-18T19:20:15","slug":"login-otp-flow","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/","title":{"rendered":"Build a phone number login with OTP (Fast2SMS Smart OTP)"},"content":{"rendered":"<p>This guide shows how to build a phone number login with OTP using Fast2SMS Smart OTP: the screens, the server calls, resend and lockout rules, and how to stop bots from draining your wallet. The same flow covers signup mobile verification and password reset by OTP. It is written for developers and product owners planning OTP login for a website or app in India.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Build OTP login with Smart OTP<\/strong><p>Create a Smart OTP template, then send and verify login codes on SMS or WhatsApp with three API calls.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>The flow at a glance<\/h2>\n<p><svg viewBox=\"0 0 760 170\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" role=\"img\" aria-labelledby=\"otpflow-title\" style=\"max-width:100%;height:auto\">\n<title id=\"otpflow-title\">OTP login flow: user enters mobile, your server calls Send OTP, user enters code, your server calls Verify OTP, then creates the session<\/title>\n<g font-family=\"Arial, sans-serif\" font-size=\"13\" fill=\"#101828\">\n<rect x=\"5\" y=\"40\" width=\"130\" height=\"70\" rx=\"10\" fill=\"#EAECF0\"\/><text x=\"70\" y=\"70\" text-anchor=\"middle\">User enters<\/text><text x=\"70\" y=\"88\" text-anchor=\"middle\">mobile number<\/text>\n<rect x=\"160\" y=\"40\" width=\"130\" height=\"70\" rx=\"10\" fill=\"#7F56D9\"\/><text x=\"225\" y=\"70\" text-anchor=\"middle\" fill=\"#ffffff\">Server calls<\/text><text x=\"225\" y=\"88\" text-anchor=\"middle\" fill=\"#ffffff\">\/dev\/otp\/send<\/text>\n<rect x=\"315\" y=\"40\" width=\"130\" height=\"70\" rx=\"10\" fill=\"#EAECF0\"\/><text x=\"380\" y=\"70\" text-anchor=\"middle\">User types or<\/text><text x=\"380\" y=\"88\" text-anchor=\"middle\">autofills code<\/text>\n<rect x=\"470\" y=\"40\" width=\"130\" height=\"70\" rx=\"10\" fill=\"#7F56D9\"\/><text x=\"535\" y=\"70\" text-anchor=\"middle\" fill=\"#ffffff\">Server calls<\/text><text x=\"535\" y=\"88\" text-anchor=\"middle\" fill=\"#ffffff\">\/dev\/otp\/verify<\/text>\n<rect x=\"625\" y=\"40\" width=\"130\" height=\"70\" rx=\"10\" fill=\"#EAECF0\"\/><text x=\"690\" y=\"70\" text-anchor=\"middle\">Session created,<\/text><text x=\"690\" y=\"88\" text-anchor=\"middle\">user logged in<\/text>\n<g stroke=\"#101828\" stroke-width=\"2\"><line x1=\"135\" y1=\"75\" x2=\"156\" y2=\"75\"\/><line x1=\"290\" y1=\"75\" x2=\"311\" y2=\"75\"\/><line x1=\"445\" y1=\"75\" x2=\"466\" y2=\"75\"\/><line x1=\"600\" y1=\"75\" x2=\"621\" y2=\"75\"\/><\/g>\n<text x=\"380\" y=\"140\" text-anchor=\"middle\">Resend (same code) allowed after the wait time, up to 5 sends in 10 minutes<\/text>\n<\/g>\n<\/svg><\/p>\n<p>Fast2SMS creates the code, sends it on SMS or WhatsApp, and checks it. Your server never stores the OTP. It only decides who may ask for one and what happens after a correct code.<\/p>\n<h2>Before you start<\/h2>\n<ul>\n<li><strong>An approved OTP template:<\/strong> a DLT content template for SMS, or a WhatsApp authentication template. Add the DLT template in <strong>DLT Manager<\/strong> first.<\/li>\n<li><strong>A Smart OTP template<\/strong> that links it and gives you an <strong>OTP ID<\/strong>.<\/li>\n<li><strong>API key<\/strong> with <strong>API Access<\/strong> on, kept on your server.<\/li>\n<li><strong>Wallet balance.<\/strong> Every send and resend is charged. Verify is free.<\/li>\n<\/ul>\n<h2>Set up Smart OTP in the panel<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Create the OTP template<\/h3>\n<p>Open Smart OTP, <strong>OTP Template List<\/strong>, and click <strong>Add OTP Template<\/strong>. Choose the channel, the entity and sender (for SMS) and your approved template, then pick which variable holds the OTP. Tick <strong>SET FALLBACK TEMPLATE<\/strong> to add the other channel as a backup, then click <strong>Assign OTP Template<\/strong>.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Add OTP Template window with an SMS DLT template, Variable 1 selected as the OTP, SET FALLBACK TEMPLATE ticked and a WhatsApp number and login_otp template chosen as fallback\"><figcaption>An SMS OTP template with a WhatsApp fallback.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Copy the OTP ID<\/h3>\n<p>The new card in <strong>OTP Template List<\/strong> shows the <strong>OTP ID<\/strong>. Copy it into your server settings with the <a href=\"\/help\/api-key-find-reset\/\">API key<\/a>.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-template-list-hd-17-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"OTP Template List with SMS and WhatsApp OTP cards showing OTP ID, sender or number, template ID and fallback\"><figcaption>One OTP ID is enough for login, signup and password reset.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Set the wait time and attempts<\/h3>\n<p>Open <strong>OTP Settings<\/strong>. <strong>Max Verify OTP Limit<\/strong> (1 to 100, default 10) is how many wrong codes one OTP allows. <strong>SMS Resend \/ Time Limit<\/strong> (0 to 3600 seconds, default 10) is the minimum wait before the same number can get another OTP. A login screen usually works well with 3 to 5 attempts and a 30 to 60 second wait.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-settings-hd-11-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"OTP Settings with Max Verify OTP Limit set to 5 and SMS Resend \/ Time Limit set to 30 seconds\"><figcaption>Your Resend button timer should match the wait set here.<\/figcaption><\/figure>\n<\/li>\n<\/ol>\n<h2>The screens and what each one calls<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Screen \/ action<\/th>\n<th>Your server calls<\/th>\n<th>Notes<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Enter mobile, tap <strong>Send OTP<\/strong><\/td>\n<td><code>POST \/dev\/otp\/send<\/code> with <code>mobile<\/code>, <code>otp_id<\/code>, <code>otp_expiry<\/code><\/td>\n<td>Each new send cancels older OTPs for that mobile.<\/td>\n<\/tr>\n<tr>\n<td>Enter code, tap <strong>Verify<\/strong><\/td>\n<td><code>POST \/dev\/otp\/verify<\/code> with <code>mobile<\/code>, <code>otp<\/code><\/td>\n<td>No OTP ID needed. Checks the latest unverified OTP for the mobile.<\/td>\n<\/tr>\n<tr>\n<td>Tap <strong>Resend<\/strong> after the timer<\/td>\n<td><code>POST \/dev\/otp\/resend<\/code> with <code>mobile<\/code><\/td>\n<td>Same code again, charged. Up to 5 sends in 10 minutes, counting the first.<\/td>\n<\/tr>\n<tr>\n<td>Tap <strong>Change number<\/strong><\/td>\n<td>nothing<\/td>\n<td>Go back to the first screen. The next send to the new number is a fresh OTP.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<h2>Server code (Node.js example)<\/h2>\n<p>This Express example covers login, signup and password reset with one set of routes. The <code>purpose<\/code> field decides what happens after a correct code. The in-memory limits are for clarity; use Redis or your database in production.<\/p>\n<pre><code class=\"language-javascript\">import express from \"express\";\nconst app = express();\napp.use(express.json());\n\nconst KEY = process.env.FAST2SMS_API_KEY;\nconst OTP_ID = process.env.FAST2SMS_OTP_ID;\n\nasync function f2s(path, body) {\n  const res = await fetch(\"https:\/\/www.fast2sms.com\" + path, {\n    method: \"POST\",\n    headers: { authorization: KEY, \"Content-Type\": \"application\/json\" },\n    body: JSON.stringify(body),\n    signal: AbortSignal.timeout(15000),\n  });\n  const data = await res.json().catch(() =&gt; ({ message: \"Non-JSON response\" }));\n  return { ok: res.ok &amp;&amp; data.return === true, http: res.status, message: data.message };\n}\n\n\/\/ --- simple abuse limits (move to Redis in production) ---\nconst hits = new Map();\nfunction tooMany(key, max, windowMs) {\n  const now = Date.now();\n  const list = (hits.get(key) || []).filter((t) =&gt; now - t &lt; windowMs);\n  list.push(now);\n  hits.set(key, list);\n  return list.length &gt; max;\n}\n\nconst clean = (m = \"\") =&gt; String(m).replace(\/\\D\/g, \"\").slice(-10);\nconst valid = (m) =&gt; \/^[6-9]\\d{9}$\/.test(m);\n\napp.post(\"\/auth\/otp\/send\", async (req, res) =&gt; {\n  const mobile = clean(req.body.mobile);\n  const purpose = req.body.purpose;               \/\/ \"login\", \"signup\" or \"reset\"\n  if (&#33;valid(mobile)) return res.status(400).json({ error: \"Enter a valid mobile number\" });\n  if (tooMany(\"ip:\" + req.ip, 20, 3600e3) || tooMany(\"m:\" + mobile, 5, 3600e3)) {\n    return res.status(429).json({ error: \"Too many requests. Try again later.\" });\n  }\n  \/\/ signup: refuse if the mobile already has an account; reset: refuse quietly if it has none\n  const r = await f2s(\"\/dev\/otp\/send\", { mobile, otp_id: OTP_ID, otp_expiry: 5 });\n  if (&#33;r.ok) return res.status(400).json({ error: r.message });\n  res.json({ sent: true, purpose });\n});\n\napp.post(\"\/auth\/otp\/resend\", async (req, res) =&gt; {\n  const mobile = clean(req.body.mobile);\n  if (&#33;valid(mobile)) return res.status(400).json({ error: \"Enter a valid mobile number\" });\n  const r = await f2s(\"\/dev\/otp\/resend\", { mobile });\n  r.ok ? res.json({ sent: true }) : res.status(400).json({ error: r.message });\n});\n\napp.post(\"\/auth\/otp\/verify\", async (req, res) =&gt; {\n  const mobile = clean(req.body.mobile);\n  const otp = String(req.body.otp || \"\").trim();\n  if (&#33;valid(mobile) || &#33;\/^\\d{4,10}$\/.test(otp)) return res.status(400).json({ error: \"Enter the code you received\" });\n\n  const r = await f2s(\"\/dev\/otp\/verify\", { mobile, otp });\n  if (&#33;r.ok) return res.status(400).json({ error: r.message });\n\n  \/\/ Code is correct. Now act on the purpose:\n  \/\/ login  -&gt; find user by mobile, create session\n  \/\/ signup -&gt; mark mobile as verified, continue registration\n  \/\/ reset  -&gt; issue a short-lived reset token, show \"set new password\"\n  res.json({ verified: true });\n});\n\napp.listen(3000);<\/code><\/pre>\n<p>The same three calls in other languages are in the PHP, Python, Java and C# guides linked at the end.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Make OTP delivery more reliable<\/strong><p>Add a WhatsApp fallback to your SMS OTP template so a failed SMS is re-sent on WhatsApp with the same code.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Rules that shape the user experience<\/h2>\n<h3>Expiry<\/h3>\n<p>Set <code>otp_expiry<\/code> in minutes on each send (1 to 10080, default 15). For login, 5 to 10 minutes is enough. After that, verify returns &#8220;OTP expired&#8221;.<\/p>\n<h3>Resend<\/h3>\n<ul>\n<li>Resend sends the <strong>same<\/strong> code. Tell the user &#8220;We sent the same code again&#8221;, so they do not wait for a different one.<\/li>\n<li>It only works within 10 minutes of the first send, and up to 5 sends in total including the first. After that, call send again for a new code.<\/li>\n<li>Calls inside the wait time get &#8220;Please wait N seconds before requesting a new OTP&#8221;. Show a visible countdown.<\/li>\n<\/ul>\n<h3>Wrong codes and lockout<\/h3>\n<ul>\n<li>Each wrong code returns &#8220;Invalid OTP&#8221; and uses one attempt.<\/li>\n<li>When the attempts set in <strong>OTP Settings<\/strong> are used up, the OTP is dead: &#8220;Maximum verification attempts reached. OTP is no longer valid.&#8221; The user needs a new OTP.<\/li>\n<li>Add your own limit on top, such as no more than a few OTP sends per mobile per hour, so one person cannot keep guessing with fresh codes.<\/li>\n<\/ul>\n<h3>One OTP at a time<\/h3>\n<p>A new send to a number cancels every older OTP for it, even under another OTP ID. If your page sends an OTP on load or on refresh, the code in the user&#8217;s hand stops working. Send only when the user taps the button.<\/p>\n<h2>Signup and password reset<\/h2>\n<ul>\n<li><strong>Signup:<\/strong> verify the mobile before you create the account, or create it as &#8220;unverified&#8221; and switch it after a correct code. Do not let an unverified number log in.<\/li>\n<li><strong>Password reset:<\/strong> do not reveal whether a number has an account. Show the same &#8220;If this number is registered, you will get a code&#8221; message either way. After a correct code, give a short-lived reset token and ask for the new password on the next screen.<\/li>\n<li><strong>Change of mobile number:<\/strong> send the OTP to the <em>new<\/em> number and only update it after a correct code.<\/li>\n<\/ul>\n<h2>Protect your wallet from OTP abuse<\/h2>\n<p>Every send is charged, so bots that hit your send endpoint cost you money. Simple defences:<\/p>\n<ul>\n<li>Limit sends per IP, per device and per mobile per hour on your server.<\/li>\n<li>Accept only 10-digit Indian mobiles starting with 6 to 9 if you serve India only.<\/li>\n<li>Add a captcha or app attestation on the send step when you see spikes.<\/li>\n<li>Keep the API key only on the server, and use <strong>API Security<\/strong> to allow only your server&#8217;s IP.<\/li>\n<li>Watch the OTP report: many sends with low delivery or no verifies usually means abuse.<\/li>\n<\/ul>\n<h2>Check delivery and verification<\/h2>\n<p>The <strong>Delivery Report<\/strong> under Smart OTP shows each OTP with its status (Delivered, Failed, Sent, Pending, and Read for WhatsApp). The OTP digits are masked. When a fallback was used, the request shows a second receiver row on the other channel.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/otp-report-hd-3-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"OTP Reports page with summary cards for Total, Delivered, Read, Failed, Sent and Pending, an OTP Activity chart and a status donut\"><figcaption>OTP delivery for the last 2 days.<\/figcaption><\/figure>\n<p>To see which OTPs were verified, export the OTP report. The file has <strong>Verified<\/strong> (Yes, No or Expired) and <strong>Verified At<\/strong> columns. For live status on your server, add an OTP <a href=\"\/help\/fast2sms-webhooks-setup-delivery-reports\/\">webhook<\/a> under <strong>Webhook<\/strong>, <strong>OTP<\/strong>.<\/p>\n<h2>Common problems and fixes<\/h2>\n<ul>\n<li><strong>&#8220;OTP not found or already verified&#8221; on a fresh code:<\/strong> a second send went out (double tap, page reload), which cancelled the first. Disable the button while sending.<\/li>\n<li><strong>&#8220;Please wait N seconds&#8230;&#8221; right after the first send:<\/strong> your Resend button is active too early. Start the timer at the wait set in <strong>OTP Settings<\/strong>.<\/li>\n<li><strong>&#8220;Invalid OTP ID&#8221;:<\/strong> the OTP ID is from another account or was deleted.<\/li>\n<li><strong>&#8220;Invalid authorization key&#8221;:<\/strong> the key has &#8220;Bearer &#8221; in front, or is wrong.<\/li>\n<li><strong>Users say the code never came:<\/strong> check the request in the OTP report. If SMS failed, add a WhatsApp fallback to the template.<\/li>\n<\/ul>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Do I need to store the OTP in my database?<\/h3>\n<p>No. Smart OTP keeps the code and checks it when you call verify. You store only whether the user passed.<\/p>\n<h3>Can I use my own OTP value?<\/h3>\n<p>Yes. Pass <code>otp<\/code> (up to 10 characters) on send. Fast2SMS still verifies it.<\/p>\n<h3>What OTP length should I use?<\/h3>\n<p>6 digits is the default and a good choice. <code>otp_length<\/code> can be 4 to 10; values below 4 are changed to 6.<\/p>\n<h3>Is there a limit on resends?<\/h3>\n<p>Yes. 5 sends of the same OTP in 10 minutes, counting the first, so 4 resends. Plus the wait time between sends from OTP Settings.<\/p>\n<h3>Can I send login OTP on WhatsApp?<\/h3>\n<p>Yes. Use a WhatsApp authentication template in Smart OTP, or add WhatsApp as the fallback for an SMS template.<\/p>\n<h3>Can I use DLT SMS for OTP instead?<\/h3>\n<p>Yes. Send your approved OTP template with <code>route=dlt<\/code> and the code in <code>variables_values<\/code>. Then your server must create, store, expire and check the code itself.<\/p>\n<h3>Is verify charged?<\/h3>\n<p>No. Only send and resend are charged.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Launch OTP login this week<\/strong><p>Sign up, create your Smart OTP template and connect send, verify and resend from your server.<\/p><\/div><div class=\"f2s-cta__actions\"><a class=\"f2s-cta__btn f2s-cta__btn--primary\" href=\"https:\/\/www.fast2sms.com\/\"><span>Sign up free<\/span> <span class=\"f2sh-btn__arrow\" aria-hidden=\"true\">&rarr;<\/span><\/a><a class=\"f2s-cta__btn f2s-cta__btn--ghost\" href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Book a free meeting<\/a><\/div><\/aside>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"\/help\/smart-otp-setup-guide-fast2sms\/\">Smart OTP setup guide<\/a><\/li>\n<li><a href=\"\/help\/smart-otp-settings-cooldown-attempts\/\">Smart OTP settings: resend wait time and verify attempts<\/a><\/li>\n<li><a href=\"\/help\/smart-otp-best-practices\/\">OTP security best practices with Fast2SMS<\/a><\/li>\n<li><a href=\"\/help\/otp-autofill-android-ios-sms-retriever\/\">OTP autofill on Android, iPhone and websites<\/a><\/li>\n<li><a href=\"\/help\/nodejs-sms-api\/\">Send SMS and OTP in Node.js with Fast2SMS API<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/otp-sms\">Fast2SMS OTP SMS<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This guide shows how to build a phone number login with OTP using Fast2SMS Smart OTP: the screens, the server calls, resend and lockout rules, and how to stop bots from draining your wallet. The same flow covers signup mobile verification and password reset by OTP. It is written for developers and product owners planning [&hellip;]<\/p>\n","protected":false},"featured_media":18690,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-18694","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-api","category-otp"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Phone Number Login with OTP: Build Guide | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Phone Number Login with OTP: Build Guide | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/\" \/>\n<meta property=\"og:site_name\" content=\"Fast2SMS\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/Fast2SMS\/\" \/>\n<meta property=\"article:published_time\" content=\"2026-11-18T18:40:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T19:20:15+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@fast2sms\" \/>\n<meta name=\"twitter:site\" content=\"@fast2sms\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"Build a phone number login with OTP (Fast2SMS Smart OTP)\",\"datePublished\":\"2026-11-18T18:40:10+00:00\",\"dateModified\":\"2026-11-18T19:20:15+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/\"},\"wordCount\":1455,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\",\"articleSection\":[\"API\",\"OTP\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/\",\"name\":\"Phone Number Login with OTP: Build Guide | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\",\"datePublished\":\"2026-11-18T18:40:10+00:00\",\"dateModified\":\"2026-11-18T19:20:15+00:00\",\"description\":\"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"Add OTP Template window with an SMS DLT template, Variable 1 selected as the OTP, SET FALLBACK TEMPLATE ticked and a WhatsApp number and login_otp template chosen as fallback\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/login-otp-flow\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/api\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Build a phone number login with OTP (Fast2SMS Smart OTP)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\",\"name\":\"Fast2SMS\",\"description\":\"Help\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"inLanguage\":\"en-IN\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\",\"name\":\"Fast2SMS\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/Fast2SMS.png\",\"caption\":\"Fast2SMS\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#logo\"},\"email\":\"support@fast2sms.com\",\"telephone\":\"+91-6262778822\",\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/Fast2SMS\",\"https:\\\/\\\/www.instagram.com\\\/fast2sms\",\"https:\\\/\\\/x.com\\\/fast2sms\",\"https:\\\/\\\/www.youtube.com\\\/Fast2SMSofficial\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/fast2sms\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Phone Number Login with OTP: Build Guide | Fast2SMS","description":"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/","og_locale":"en_US","og_type":"article","og_title":"Phone Number Login with OTP: Build Guide | Fast2SMS","og_description":"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.","og_url":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T18:40:10+00:00","article_modified_time":"2026-11-18T19:20:15+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp","type":"image\/webp"}],"twitter_card":"summary_large_image","twitter_creator":"@fast2sms","twitter_site":"@fast2sms","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"Build a phone number login with OTP (Fast2SMS Smart OTP)","datePublished":"2026-11-18T18:40:10+00:00","dateModified":"2026-11-18T19:20:15+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/"},"wordCount":1455,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp","articleSection":["API","OTP"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/","url":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/","name":"Phone Number Login with OTP: Build Guide | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp","datePublished":"2026-11-18T18:40:10+00:00","dateModified":"2026-11-18T19:20:15+00:00","description":"Build phone number login with OTP using Fast2SMS Smart OTP: screens, send, verify and resend calls, expiry, lockout, signup and reset, and abuse limits.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/login-otp-flow\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-with-whatsapp-fallback-hd-4-scaled.webp","width":2560,"height":1600,"caption":"Add OTP Template window with an SMS DLT template, Variable 1 selected as the OTP, SET FALLBACK TEMPLATE ticked and a WhatsApp number and login_otp template chosen as fallback"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/login-otp-flow\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fast2sms.com\/help\/"},{"@type":"ListItem","position":2,"name":"API","item":"https:\/\/www.fast2sms.com\/help\/api\/"},{"@type":"ListItem","position":3,"name":"Build a phone number login with OTP (Fast2SMS Smart OTP)"}]},{"@type":"WebSite","@id":"https:\/\/www.fast2sms.com\/help\/#website","url":"https:\/\/www.fast2sms.com\/help\/","name":"Fast2SMS","description":"Help","publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"inLanguage":"en-IN"},{"@type":"Organization","@id":"https:\/\/www.fast2sms.com\/#organization","name":"Fast2SMS","url":"https:\/\/www.fast2sms.com\/","logo":{"@type":"ImageObject","@id":"https:\/\/www.fast2sms.com\/#logo","url":"https:\/\/www.fast2sms.com\/Fast2SMS.png","contentUrl":"https:\/\/www.fast2sms.com\/Fast2SMS.png","caption":"Fast2SMS"},"image":{"@id":"https:\/\/www.fast2sms.com\/#logo"},"email":"support@fast2sms.com","telephone":"+91-6262778822","sameAs":["https:\/\/www.facebook.com\/Fast2SMS","https:\/\/www.instagram.com\/fast2sms","https:\/\/x.com\/fast2sms","https:\/\/www.youtube.com\/Fast2SMSofficial","https:\/\/www.linkedin.com\/company\/fast2sms"]}]}},"_links":{"self":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18694","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/comments?post=18694"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18694\/revisions"}],"predecessor-version":[{"id":19352,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/18694\/revisions\/19352"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/18690"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=18694"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=18694"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=18694"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}