{"id":19180,"date":"2026-11-19T00:31:11","date_gmt":"2026-11-18T19:01:11","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/"},"modified":"2026-11-19T00:55:28","modified_gmt":"2026-11-18T19:25:28","slug":"two-factor-authentication-otp-saas","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/","title":{"rendered":"Two-factor authentication with OTP for SaaS: when to ask, flow and settings"},"content":{"rendered":"<p>Two-factor authentication (2FA) with OTP asks a SaaS user for two things: their password and a one-time code sent to their phone. A stolen password alone is then not enough to get in. This guide explains how to add two-factor authentication with OTP to a SaaS product using Fast2SMS Smart OTP: when to ask for the code, the server flow, remembered devices, recovery and the settings to use.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Add 2FA to your SaaS<\/strong><p>Smart OTP sends the second factor by SMS or WhatsApp and verifies it for you.<\/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>When to ask for the OTP<\/h2>\n<p>Asking for a code on every login annoys users. Most SaaS products ask at these moments:<\/p>\n<ul>\n<li><strong>New device or browser:<\/strong> the first login from a device that has not been seen before.<\/li>\n<li><strong>Sensitive actions:<\/strong> changing the email, mobile number or password, adding a team member, changing billing, downloading data, or viewing API keys.<\/li>\n<li><strong>Risky logins:<\/strong> many failed passwords, or a login long after the last one.<\/li>\n<li><strong>Admin roles:<\/strong> owners and admins can be asked every time.<\/li>\n<\/ul>\n<p>Asking again for a sensitive action is often called step-up authentication. Fast2SMS uses it in its own panel: viewing or resetting your <a href=\"\/help\/api-key-find-reset\/\">API key<\/a> needs an OTP sent to your mobile.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"View Authorization Key confirmation saying an OTP will be sent to your mobile to reveal your Authorization Key\"><figcaption>A step-up OTP before a sensitive action.<\/figcaption><\/figure>\n<h2>The 2FA flow on your server<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Check the password first<\/h3>\n<p>Only after the password is correct, decide if a code is needed. Do not send an OTP to anyone who just types a mobile number. That would let strangers spend your wallet.<\/p>\n<\/li>\n<li>\n<h3>Send the OTP to the saved number<\/h3>\n<p>Call Send OTP with the mobile number saved on the account, never one typed on the 2FA screen. Mark the user&#8217;s session as &#8220;waiting for code&#8221;.<\/p>\n<pre><code class=\"language-bash\">curl -X POST \"https:\/\/www.fast2sms.com\/dev\/otp\/send\" \\\n  -H \"authorization: YOUR_API_KEY\" \\\n  -H \"Content-Type: application\/json\" \\\n  -d '{\"mobile\":\"9999999999\",\"otp_id\":\"YOUR_OTP_ID\",\"otp_expiry\":5,\"udf1\":\"2fa-login\"}'<\/code><\/pre>\n<\/li>\n<li>\n<h3>Verify, then finish the login<\/h3>\n<p>Call <code>\/dev\/otp\/verify<\/code> with the number and the code. Only on &#8220;OTP verified successfully&#8221; mark the session as fully logged in. Start a new session ID at this point.<\/p>\n<\/li>\n<li>\n<h3>Remember the device if the user asks<\/h3>\n<p>Offer &#8220;Trust this device for 30 days&#8221;. Store a random, signed token in a secure cookie and on your server. Skip the OTP while the token is valid, and let users remove trusted devices from their security page.<\/p>\n<\/li>\n<\/ol>\n<h2>Smart OTP settings for 2FA<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Setting<\/th>\n<th>Where<\/th>\n<th>Suggested for 2FA<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Code length<\/td>\n<td><code>otp_length<\/code> in Send OTP<\/td>\n<td>6 digits (the default)<\/td>\n<\/tr>\n<tr>\n<td>Expiry<\/td>\n<td><code>otp_expiry<\/code> in Send OTP<\/td>\n<td>5 minutes<\/td>\n<\/tr>\n<tr>\n<td>Wrong tries per code<\/td>\n<td><strong>Max Verify OTP Limit (Per SMS)<\/strong> in OTP Settings<\/td>\n<td>3 to 5<\/td>\n<\/tr>\n<tr>\n<td>Wait between sends<\/td>\n<td><strong>SMS Resend \/ Time Limit (Seconds)<\/strong> in OTP Settings<\/td>\n<td>30 to 60 seconds<\/td>\n<\/tr>\n<tr>\n<td>Second channel<\/td>\n<td><strong>Fallback<\/strong> on the template<\/td>\n<td>WhatsApp fallback for SMS, or the other way round<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-settings-hd-1-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"OTP Settings page with Max Verify OTP Limit 5 and SMS Resend Time Limit 30 seconds\"><figcaption>Verify and resend limits apply to every OTP from your account.<\/figcaption><\/figure>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Use SMS and WhatsApp for 2FA<\/strong><p>Add a fallback so users on poor signal still get their 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>Plan for lost phones<\/h2>\n<ul>\n<li>Give users one-time backup codes when they turn on 2FA, and ask them to keep them safe.<\/li>\n<li>Let a team owner or admin reset 2FA for a member, with a log entry.<\/li>\n<li>When a user changes their mobile number, send an OTP to both the old and the new number, or ask for a backup code.<\/li>\n<li>Do not let support staff turn off 2FA on a phone call alone.<\/li>\n<\/ul>\n<h2>Keep the 2FA itself safe<\/h2>\n<ul>\n<li>Call Fast2SMS only from your server, and turn on <strong>API Security<\/strong> so only your server IPs can use the key.<\/li>\n<li>Write the OTP message so it says what the code is for and &#8220;Do not share this code&#8221;.<\/li>\n<li>Track 2FA sends with <code>udf1<\/code> to <code>udf3<\/code> so you can tell them apart from signup OTPs in reports and <a href=\"\/help\/fast2sms-webhooks-setup-delivery-reports\/\">webhooks<\/a>.<\/li>\n<li>Export the OTP report to see how many 2FA codes were verified, expired or never used.<\/li>\n<\/ul>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-template-list-hd-1-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Smart OTP Template List with WhatsApp and SMS OTP template cards and their OTP IDs and fallback settings\"><figcaption>A separate template for 2FA keeps its message clear.<\/figcaption><\/figure>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Is SMS OTP good enough for SaaS 2FA?<\/h3>\n<p>It is far better than a password alone and works for every user with a phone. For high-risk admin accounts you can offer an authenticator app as well.<\/p>\n<h3>Can I send 2FA codes on WhatsApp?<\/h3>\n<p>Yes. Create a Smart OTP template on the WhatsApp channel with an approved Authentication template, and add an SMS fallback for users without WhatsApp.<\/p>\n<h3>Should 2FA be on by default?<\/h3>\n<p>Many SaaS products make it optional for members and required for owners and admins. Start there and tighten later.<\/p>\n<h3>Do I need to store the OTP?<\/h3>\n<p>No. Smart OTP stores and checks it. Store only the session state and trusted-device tokens.<\/p>\n<h3>What happens when the user sends a wrong code too many times?<\/h3>\n<p>After the limit, verify answers &#8220;Maximum verification attempts reached. OTP is no longer valid.&#8221; Send a new code, and consider locking the account for a short time.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Secure your users&#039; accounts<\/strong><p>Create a free account and add OTP 2FA with Smart OTP.<\/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=\"https:\/\/www.fast2sms.com\/help\/how-will-two-factor-authentication-help-your-business-to-grow\/\">How two-factor authentication helps your business<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/help\/smart-otp-setup-guide-fast2sms\/\">Smart OTP in Fast2SMS: set up OTP on SMS and WhatsApp with fallback<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/help\/otp-sms-api\/\">OTP SMS API for India: send and verify OTP<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/help\/understanding-sms-api-authentication-and-security\/\">Understanding SMS API authentication and security<\/a><\/li>\n<li><a href=\"https:\/\/www.fast2sms.com\/otp-sms\">Smart OTP: SMS and WhatsApp OTP API<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Two-factor authentication (2FA) with OTP asks a SaaS user for two things: their password and a one-time code sent to their phone. A stolen password alone is then not enough to get in. This guide explains how to add two-factor authentication with OTP to a SaaS product using Fast2SMS Smart OTP: when to ask for [&hellip;]<\/p>\n","protected":false},"featured_media":17792,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,5],"tags":[],"class_list":["post-19180","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>Two-Factor Authentication with OTP for SaaS | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.\" \/>\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\/two-factor-authentication-otp-saas\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Two-Factor Authentication with OTP for SaaS | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/\" \/>\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-18T19:01:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-18T19:25:28+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-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\\\/two-factor-authentication-otp-saas\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"Two-factor authentication with OTP for SaaS: when to ask, flow and settings\",\"datePublished\":\"2026-11-18T19:01:11+00:00\",\"dateModified\":\"2026-11-18T19:25:28+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/\"},\"wordCount\":858,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-view-confirm-hd-scaled.webp\",\"articleSection\":[\"API\",\"OTP\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/\",\"name\":\"Two-Factor Authentication with OTP for SaaS | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-view-confirm-hd-scaled.webp\",\"datePublished\":\"2026-11-18T19:01:11+00:00\",\"dateModified\":\"2026-11-18T19:25:28+00:00\",\"description\":\"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-view-confirm-hd-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/api-key-view-confirm-hd-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"View Authorization Key confirmation box saying an OTP will be sent to your mobile, with Cancel and Confirm buttons\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/two-factor-authentication-otp-saas\\\/#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\":\"Two-factor authentication with OTP for SaaS: when to ask, flow and settings\"}]},{\"@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":"Two-Factor Authentication with OTP for SaaS | Fast2SMS","description":"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.","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\/two-factor-authentication-otp-saas\/","og_locale":"en_US","og_type":"article","og_title":"Two-Factor Authentication with OTP for SaaS | Fast2SMS","og_description":"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.","og_url":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T19:01:11+00:00","article_modified_time":"2026-11-18T19:25:28+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-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\/two-factor-authentication-otp-saas\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"Two-factor authentication with OTP for SaaS: when to ask, flow and settings","datePublished":"2026-11-18T19:01:11+00:00","dateModified":"2026-11-18T19:25:28+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/"},"wordCount":858,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-scaled.webp","articleSection":["API","OTP"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/","url":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/","name":"Two-Factor Authentication with OTP for SaaS | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-scaled.webp","datePublished":"2026-11-18T19:01:11+00:00","dateModified":"2026-11-18T19:25:28+00:00","description":"Add two-factor authentication with OTP to your SaaS: when to ask for a code, the server flow, trusted devices, recovery and the Smart OTP settings to use.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-view-confirm-hd-scaled.webp","width":2560,"height":1600,"caption":"View Authorization Key confirmation box saying an OTP will be sent to your mobile, with Cancel and Confirm buttons"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/two-factor-authentication-otp-saas\/#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":"Two-factor authentication with OTP for SaaS: when to ask, flow and settings"}]},{"@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\/19180","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=19180"}],"version-history":[{"count":1,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19180\/revisions"}],"predecessor-version":[{"id":19449,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19180\/revisions\/19449"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/17792"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=19180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=19180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=19180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}