{"id":19680,"date":"2026-11-19T01:29:17","date_gmt":"2026-11-18T19:59:17","guid":{"rendered":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/"},"modified":"2026-11-19T01:29:17","modified_gmt":"2026-11-18T19:59:17","slug":"otp-widget-wordpress-plugin-fast2sms","status":"publish","type":"post","link":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/","title":{"rendered":"WordPress OTP verification with a shortcode: the Fast2SMS OTP widget plugin"},"content":{"rendered":"<p>This guide adds WordPress OTP verification with a small plugin, &#8220;OTP Widget for Fast2SMS&#8221;. It puts an OTP box on any page with the shortcode &#091;f2s_otp&#093;, and it can make an existing form wait until the visitor&#8217;s mobile number is verified by SMS or WhatsApp. The plugin is its own backend: your API key stays in <code>wp-config.php<\/code> on the server and never reaches the page.<\/p>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Add OTP verification to your WordPress site<\/strong><p>Create a Smart OTP template, copy the OTP ID and install the widget plugin.<\/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<p class=\"f2s-kit-wrap\"><a class=\"f2s-kit\" href=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/fast2sms-otp-widget-wordpress.zip\" download><svg class=\"f2s-kit__icon\" width=\"28\" height=\"28\" viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path fill=\"#7F56D9\" d=\"M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2z\"\/><path fill=\"#FFFFFF\" d=\"M14 2v6h6\"\/><path fill=\"#FFFFFF\" d=\"M9 6h2v2H9zm2 2h2v2h-2zM9 10h2v2H9zm2 2h2v2h-2zm-2 2h4v4H9z\"\/><rect x=\"10\" y=\"15.4\" width=\"2\" height=\"1.6\" fill=\"#7F56D9\"\/><\/svg><span class=\"f2s-kit__text\"><strong>Download the WordPress OTP widget kit (zip)<\/strong><span class=\"f2s-kit__meta\">fast2sms-otp-widget-wordpress.zip &middot; 40 KB<\/span><\/span><span class=\"f2s-kit__btn\">Download .zip<\/span><\/a><\/p>\n<div class=\"f2s-note f2s-note--warn\"><strong>Partly tested.<\/strong> We loaded the plugin with stand-ins for the WordPress functions it uses and ran its REST route and shortcode against a mock copy of the Fast2SMS API: 10 of 10 checks passed. It has not been installed on a real WordPress site yet. Its OTP logic is the same PHP core as the PHP single-file kit, which passed 47 of 47 checks. Try it on a staging site first.<\/div>\n<div class=\"f2s-note\">This is <strong>not<\/strong> the official Fast2SMS plugin on wordpress.org, and it does not clash with it. For WooCommerce order SMS and the official plugin&#8217;s features, see the <a href=\"\/help\/fast2sms-wordpress-plugin-setup-guide\/\">Fast2SMS WordPress plugin guide<\/a>.<\/div>\n<h2>Before you start<\/h2>\n<ul>\n<li>A Fast2SMS account with wallet balance, and an approved DLT OTP template (SMS) or WhatsApp Authentication\/Utility template.<\/li>\n<li>WordPress 6.0 or newer on PHP 8.1 or newer.<\/li>\n<li>Access to <code>wp-config.php<\/code> (through your host&#8217;s File Manager or FTP).<\/li>\n<\/ul>\n<h2>Set up WordPress OTP verification<\/h2>\n<ol class=\"f2s-steps\">\n<li>\n<h3>Create a Smart OTP template and copy its OTP ID<\/h3>\n<p>In the panel, open <strong>Smart OTP<\/strong> &gt; <strong>OTP Template List<\/strong> and click <strong>Add OTP Template<\/strong>. On the <strong>SMS Channel<\/strong> tab, pick your DLT entity, sender and approved OTP template, then click the variable that should carry the code. For WhatsApp, use the <strong>WhatsApp Channel<\/strong> tab with an approved Authentication or Utility template. Tick <strong>SET FALLBACK TEMPLATE<\/strong> if you want the other channel as a backup, then click <strong>Assign OTP Template<\/strong>.<\/p>\n<p>Copy the 10-character <strong>OTP ID<\/strong> from the new card. It decides the channel, the template and the fallback for every code the widget sends.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"Add OTP Template window on the SMS Channel tab with entity, sender and DLT template chosen and Variable 1 selected\"><figcaption>Pick the entity, sender and DLT template, then the variable that carries the OTP.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Copy your API key<\/h3>\n<p>Under <strong>Utility<\/strong> in the left menu, click <strong>API Key<\/strong>. Click <strong>View<\/strong> (the panel first asks for an OTP sent to your registered mobile) and copy the <strong>Authorization Key<\/strong>. Check that <strong>API Access<\/strong> is switched on. This key will live only in your backend&#8217;s settings, never in a page or an app.<\/p>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/api-key-hd-33-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"API Key page with the masked Authorization Key, View and Reset buttons and the API Access switch turned on\"><figcaption>Copy the Authorization Key. API Access must be on.<\/figcaption><\/figure>\n<\/li>\n<li>\n<h3>Add the settings to wp-config.php<\/h3>\n<p>Open <code>wp-config.php<\/code> and add these lines above the line that says &#8220;That&#8217;s all, stop editing&#8221;:<\/p>\n<pre><code class=\"language-php\">define( 'FAST2SMS_API_KEY', 'YOUR_API_KEY' );   \/\/ Fast2SMS &gt; Settings &gt; API Key\ndefine( 'F2S_OTP_ID', 'YOUR_OTP_ID' );              \/\/ Smart OTP &gt; OTP Template List\ndefine( 'F2S_TOKEN_SECRET', 'paste 64 random characters here' );<\/code><\/pre>\n<p>The plugin reads its settings only from <code>wp-config.php<\/code>, never from the database, so the key cannot leak through a settings page or an export. If a setting is missing, admins see a notice that names it and visitors see nothing.<\/p>\n<\/li>\n<li>\n<h3>Install the plugin<\/h3>\n<p>Unzip the kit. Inside it is the plugin folder <code>f2s-otp-widget<\/code>. Upload that folder to <code>wp-content\/plugins\/<\/code>, or zip just that folder and upload it in <strong>Plugins<\/strong> &gt; <strong>Add New<\/strong> &gt; <strong>Upload Plugin<\/strong>. Then click <strong>Activate<\/strong>.<\/p>\n<\/li>\n<li>\n<h3>Put the shortcode on a page<\/h3>\n<p>Add a Shortcode block, or type the shortcode in the editor:<\/p>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>Shortcode<\/th>\n<th>What it does<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>&#091;f2s_otp&#093;<\/code><\/td>\n<td>A box that verifies a mobile number.<\/td>\n<\/tr>\n<tr>\n<td><code>&#091;f2s_otp protect=\"#my-form\" mobile_field=\"phone\"&#093;<\/code><\/td>\n<td>Makes the form <code>#my-form<\/code> wait for OTP, using the form&#8217;s own <code>phone<\/code> field.<\/td>\n<\/tr>\n<tr>\n<td><code>&#091;f2s_otp otp_id=\"YOUR_SECOND_OTP_ID\" title=\"Verify your number\"&#093;<\/code><\/td>\n<td>Uses a second OTP template, for example WhatsApp-only. The ID must also be in <code>F2S_OTP_IDS<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/li>\n<li>\n<h3>Check the token where the form is handled<\/h3>\n<p>After a correct code, the widget adds a hidden <code>f2s_token<\/code> field to the protected form. Check it on the server in the code that handles the form:<\/p>\n<pre><code class=\"language-php\">$v = f2sow_verify_token( $_POST['f2s_token'] ?? '', $_POST['phone'] ?? null );\nif ( null === $v ) {\n\twp_die( 'Mobile number not verified.', 403 );\n}\n\/\/ $v['mobile'] is the verified 10-digit number. A token works only once.<\/code><\/pre>\n<\/li>\n<\/ol>\n<figure class=\"f2s-shot\"><img src=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-settings-hd-24-scaled.webp\" width=\"1440\" height=\"900\" loading=\"lazy\" decoding=\"async\" alt=\"OTP Settings page with Max Verify OTP Limit set to 5 and SMS Resend \/ Time Limit set to 30 seconds\"><figcaption>Fast2SMS&#8217;s own limits. The widget&#8217;s limits run first, on your backend.<\/figcaption><\/figure>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Get your OTP ID<\/strong><p>Create a Smart OTP template on SMS or WhatsApp, with fallback, and add it to wp-config.php.<\/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>Example: Contact Form 7<\/h2>\n<p>The kit&#8217;s README shows this for a Contact Form 7 form with a field <code>[tel* your-phone]<\/code>. Put the shortcode <code>&#091;f2s_otp protect=\".wpcf7-form\" mobile_field=\"your-phone\"&#093;<\/code> on the same page, and add this to your theme&#8217;s <code>functions.php<\/code> or a small plugin:<\/p>\n<pre><code class=\"language-php\">add_filter( 'wpcf7_validate', function ( $result, $tags ) {\n\t$v = f2sow_verify_token( $_POST['f2s_token'] ?? '', $_POST['your-phone'] ?? null );\n\tif ( null === $v ) {\n\t\tforeach ( $tags as $tag ) {\n\t\t\tif ( 'your-phone' === $tag-&gt;name ) {\n\t\t\t\t$result-&gt;invalidate( $tag, 'Please verify your mobile number.' );\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}, 20, 2 );<\/code><\/pre>\n<p>The form then refuses to send until the number is verified, even if someone posts it without the widget. This example has not been tested with Contact Form 7 yet.<\/p>\n<h2>Good to know<\/h2>\n<ul>\n<li><strong>Backend URL:<\/strong> the plugin adds the REST route <code>\/wp-json\/f2s-otp\/v1\/otp<\/code>. The shortcode points the widget at it for you.<\/li>\n<li><strong>Caching plugins:<\/strong> the route sends <code>Cache-Control: no-store<\/code>, but exclude <code>\/wp-json\/f2s-otp\/<\/code> from your page cache to be safe.<\/li>\n<li><strong>Cloudflare in front of the site:<\/strong> set <code>F2S_TRUST_PROXY<\/code> to <code>1<\/code> so the per-IP limit sees the visitor&#8217;s IP.<\/li>\n<li><strong>Limits are kept in WordPress transients.<\/strong> Transients are not atomic, so under heavy parallel traffic the counts are approximate. With a persistent object cache such as Redis, they are shared across servers.<\/li>\n<li><strong>Logging users in by phone number is not included.<\/strong> It needs a decision on how numbers map to WordPress accounts, so the plugin only verifies the number and gives you the token.<\/li>\n<li><strong>API Security:<\/strong> if it is on in your account, whitelist your hosting server&#8217;s outgoing IP. See <a href=\"\/help\/api-security-ip-whitelist\/\">IP whitelisting<\/a>.<\/li>\n<\/ul>\n<h2>Optional settings<\/h2>\n<p>These also go in <code>wp-config.php<\/code>. The full list is in the kit&#8217;s <code>CONTRACT.md<\/code>.<\/p>\n<pre><code class=\"language-php\">\/\/ optional, defaults shown\ndefine( 'F2S_RESEND_WAIT', 30 );\ndefine( 'F2S_LIMIT_PER_NUMBER', 5 );\ndefine( 'F2S_LIMIT_PER_IP', 20 );\ndefine( 'F2S_MAX_VERIFY', 5 );\n\/\/ define( 'F2S_TRUST_PROXY', '1' );   \/\/ only if Cloudflare or another proxy is in front of the site<\/code><\/pre>\n<h2>Sending, resending and cost<\/h2>\n<p>Before every paid call, the plugin checks the page&#8217;s origin, the widget header, the resend wait and the limits. A new code for a number cancels the older one. &#8220;Code sent&#8221; means Fast2SMS accepted it; delivery shows in <strong>Smart OTP<\/strong> &gt; <strong>Delivery Report<\/strong>.<\/p>\n<p><strong>Resend<\/strong> sends the same code again, it does not make a new one. Fast2SMS allows it within 10 minutes of the first send, and up to 5 sends to one number in that time, counting the first.<\/p>\n<p>Every send and every resend is charged at your Smart OTP rate, and a fallback message on the second channel is charged too. Verify is free. The <strong>Test OTP<\/strong> button on a template card is also a real, charged send. See the current rates on the <a href=\"https:\/\/www.fast2sms.com\/otp-sms\">OTP SMS page<\/a>.<\/p>\n<div class=\"f2s-note f2s-volume\"><p><strong>Sending in bulk?<\/strong> For high OTP volumes our team offers discounted rates. <a href=\"https:\/\/www.fast2sms.com\/meet\/\" target=\"_blank\" rel=\"noopener\">Talk to our team<\/a> or see <a href=\"https:\/\/www.fast2sms.com\/bulk-sms-pricing\">OTP pricing<\/a>.<\/p><\/div>\n<h2>Common problems and fixes<\/h2>\n<div class=\"f2s-facts\">\n<table>\n<thead>\n<tr>\n<th>What you see<\/th>\n<th>Why<\/th>\n<th>Fix<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Admins see a notice about a missing setting<\/td>\n<td>A constant is missing or wrong in <code>wp-config.php<\/code><\/td>\n<td>Add <code>FAST2SMS_API_KEY<\/code>, <code>F2S_OTP_ID<\/code> (10 characters) and <code>F2S_TOKEN_SECRET<\/code> (32 or more).<\/td>\n<\/tr>\n<tr>\n<td>The shortcode shows as plain text<\/td>\n<td>The plugin is not active<\/td>\n<td>Activate <strong>OTP Widget for Fast2SMS<\/strong> in <strong>Plugins<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;Could not reach the server.&#8221;<\/td>\n<td>The REST route is blocked or cached, for example by a security or cache plugin<\/td>\n<td>Open <code>\/wp-json\/f2s-otp\/v1\/otp<\/code> on your site, exclude <code>\/wp-json\/f2s-otp\/<\/code> from caching, and allow it in any plugin that limits the REST API.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;We could not send the code right now.&#8221;<\/td>\n<td>An account or setup problem. Your server log names it: <code>failed reason=...<\/code><\/td>\n<td><code>invalid_otp_id<\/code>: copy the OTP ID again, from the same account as the key. <code>insufficient_balance<\/code>: recharge with <strong>Add Amount<\/strong>. <code>template_inactive<\/code>: create a new OTP template. Auth error: check the key, switch on <strong>API Access<\/strong>, or whitelist the server IP in <strong>API Security<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;Please wait N seconds&#8230;&#8221;<\/td>\n<td>The resend wait: the widget&#8217;s own, or Fast2SMS&#8217;s<\/td>\n<td>Wait. Change <code>F2S_RESEND_WAIT<\/code>, or <strong>SMS Resend \/ Time Limit<\/strong> in <strong>OTP Settings<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td>&#8220;Too many requests&#8221;<\/td>\n<td>The per-number or per-IP limit was hit<\/td>\n<td>Wait an hour, or raise <code>F2S_LIMIT_PER_NUMBER<\/code> \/ <code>F2S_LIMIT_PER_IP<\/code>.<\/td>\n<\/tr>\n<tr>\n<td>Your form handler says &#8220;not verified&#8221;<\/td>\n<td>The token is missing, was used already, is older than 10 minutes, or is for another number<\/td>\n<td>Verify again. Check the token once, when the form is submitted.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<section class=\"f2s-faq\">\n<h2>Frequently asked questions<\/h2>\n<h3>Is this the official Fast2SMS WordPress plugin?<\/h3>\n<p>No. It is a separate, small plugin from our OTP widget kits, with its own names, so both can be installed. The official plugin is covered in the <a href=\"\/help\/fast2sms-wordpress-plugin-setup-guide\/\">Fast2SMS WordPress plugin guide<\/a>.<\/p>\n<h3>Where do I enter the API key?<\/h3>\n<p>Only in <code>wp-config.php<\/code>. The plugin has no settings page, on purpose, so the key is never stored in the database.<\/p>\n<h3>Can I protect a WooCommerce or other plugin&#8217;s form?<\/h3>\n<p>You can make any form on the page wait with <code>protect=\"...\"<\/code>. For real protection, that form&#8217;s server code must also check <code>f2s_token<\/code> with <code>f2sow_verify_token()<\/code>.<\/p>\n<h3>Does it log users into WordPress with OTP?<\/h3>\n<p>No. It verifies the number and gives you a token. Logging users in by phone needs your own code that maps numbers to accounts.<\/p>\n<h3>Does it work with page builders?<\/h3>\n<p>Any builder that can show a shortcode should work, since the plugin only needs the shortcode on the page. This has not been tested with specific builders yet.<\/p>\n<h3>Is verify charged?<\/h3>\n<p>No. Each send and each resend is charged; verify is free.<\/p>\n<\/section>\n<aside class=\"f2s-cta\" aria-label=\"Get started with Fast2SMS\"><div class=\"f2s-cta__copy\"><strong class=\"f2s-cta__title\">Start with Fast2SMS Smart OTP<\/strong><p>Sign up and add mobile OTP verification to your WordPress site.<\/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\/fast2sms-wordpress-plugin-setup-guide\/\">Fast2SMS WordPress plugin: OTP SMS and WhatsApp notifications from WooCommerce<\/a><\/li>\n<li><a href=\"\/help\/wordpress-mobile-otp-verification-via-fast2sms-plugin\/\">WordPress mobile OTP verification via the Fast2SMS plugin<\/a><\/li>\n<li><a href=\"\/help\/smart-otp-setup-guide-fast2sms\/\">Smart OTP in Fast2SMS: set up OTP on SMS and WhatsApp<\/a><\/li>\n<li><a href=\"\/help\/otp-verification-signup-form\/\">OTP verification for signup forms<\/a><\/li>\n<li><a href=\"\/help\/otp-sms-pumping-fraud-protection\/\">OTP fraud and SMS pumping protection<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This guide adds WordPress OTP verification with a small plugin, &#8220;OTP Widget for Fast2SMS&#8221;. It puts an OTP box on any page with the shortcode &#091;f2s_otp&#093;, and it can make an existing form wait until the visitor&#8217;s mobile number is verified by SMS or WhatsApp. The plugin is its own backend: your API key stays [&hellip;]<\/p>\n","protected":false},"featured_media":19665,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,27],"tags":[],"class_list":["post-19680","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-otp","category-wordpress-plugin"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>WordPress OTP Verification Shortcode Plugin | Fast2SMS<\/title>\n<meta name=\"description\" content=\"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.\" \/>\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\/otp-widget-wordpress-plugin-fast2sms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"WordPress OTP Verification Shortcode Plugin | Fast2SMS\" \/>\n<meta property=\"og:description\" content=\"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/\" \/>\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:59:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-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\\\/otp-widget-wordpress-plugin-fast2sms\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"headline\":\"WordPress OTP verification with a shortcode: the Fast2SMS OTP widget plugin\",\"datePublished\":\"2026-11-18T19:59:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/\"},\"wordCount\":1481,\"publisher\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-filled-hd-12-scaled.webp\",\"articleSection\":[\"OTP\",\"WordPress Plugin\"],\"inLanguage\":\"en-IN\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/\",\"name\":\"WordPress OTP Verification Shortcode Plugin | Fast2SMS\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-filled-hd-12-scaled.webp\",\"datePublished\":\"2026-11-18T19:59:17+00:00\",\"description\":\"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#breadcrumb\"},\"inLanguage\":\"en-IN\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-IN\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-filled-hd-12-scaled.webp\",\"contentUrl\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/wp-content\\\/uploads\\\/2026\\\/11\\\/smart-otp-add-sms-filled-hd-12-scaled.webp\",\"width\":2560,\"height\":1600,\"caption\":\"Add OTP Template window on the SMS Channel tab with entity, sender and DLT template chosen and Variable 1 selected\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp-widget-wordpress-plugin-fast2sms\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"OTP\",\"item\":\"https:\\\/\\\/www.fast2sms.com\\\/help\\\/otp\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"WordPress OTP verification with a shortcode: the Fast2SMS OTP widget plugin\"}]},{\"@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":"WordPress OTP Verification Shortcode Plugin | Fast2SMS","description":"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.","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\/otp-widget-wordpress-plugin-fast2sms\/","og_locale":"en_US","og_type":"article","og_title":"WordPress OTP Verification Shortcode Plugin | Fast2SMS","og_description":"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.","og_url":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/","og_site_name":"Fast2SMS","article_publisher":"https:\/\/www.facebook.com\/Fast2SMS\/","article_published_time":"2026-11-18T19:59:17+00:00","og_image":[{"width":2560,"height":1600,"url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-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\/otp-widget-wordpress-plugin-fast2sms\/#article","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/"},"author":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"headline":"WordPress OTP verification with a shortcode: the Fast2SMS OTP widget plugin","datePublished":"2026-11-18T19:59:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/"},"wordCount":1481,"publisher":{"@id":"https:\/\/www.fast2sms.com\/#organization"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-scaled.webp","articleSection":["OTP","WordPress Plugin"],"inLanguage":"en-IN"},{"@type":"WebPage","@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/","url":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/","name":"WordPress OTP Verification Shortcode Plugin | Fast2SMS","isPartOf":{"@id":"https:\/\/www.fast2sms.com\/help\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#primaryimage"},"image":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-scaled.webp","datePublished":"2026-11-18T19:59:17+00:00","description":"Add WordPress OTP verification with a shortcode: a small plugin that verifies mobile numbers by SMS or WhatsApp and keeps your Fast2SMS key in wp-config.","breadcrumb":{"@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#breadcrumb"},"inLanguage":"en-IN","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/"]}]},{"@type":"ImageObject","inLanguage":"en-IN","@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#primaryimage","url":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-scaled.webp","contentUrl":"https:\/\/www.fast2sms.com\/help\/wp-content\/uploads\/2026\/11\/smart-otp-add-sms-filled-hd-12-scaled.webp","width":2560,"height":1600,"caption":"Add OTP Template window on the SMS Channel tab with entity, sender and DLT template chosen and Variable 1 selected"},{"@type":"BreadcrumbList","@id":"https:\/\/www.fast2sms.com\/help\/otp-widget-wordpress-plugin-fast2sms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.fast2sms.com\/help\/"},{"@type":"ListItem","position":2,"name":"OTP","item":"https:\/\/www.fast2sms.com\/help\/otp\/"},{"@type":"ListItem","position":3,"name":"WordPress OTP verification with a shortcode: the Fast2SMS OTP widget plugin"}]},{"@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\/19680","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=19680"}],"version-history":[{"count":0,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/posts\/19680\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media\/19665"}],"wp:attachment":[{"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/media?parent=19680"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/categories?post=19680"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fast2sms.com\/help\/wp-json\/wp\/v2\/tags?post=19680"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}