# Authyo OTP for WPForms

> Add email and phone OTP verification to your WPForms forms. Drag an Authyo field into your form and verify visitors by SMS, WhatsApp, Email or Voice Call before they can submit.

Source: https://authyo.io/authyo-docs/authyo-otp-for-wpforms/

> Note: Voice Call OTP is currently available only in India.

## At a glance

- **What it does:** Adds one-time-password (OTP) verification for email addresses and phone numbers to WPForms forms, using drag-and-drop fields.
- **OTP channels:** Email, SMS, WhatsApp and Voice Call (Voice Call is available in India only).
- **Fields it adds:** **Authyo Email**, **Authyo Phone** and **Authyo Email / Phone** (a smart field), in the Fancy Fields section of the form builder.
- **You need:** WPForms (Lite or Pro), WordPress 5.5+, PHP 7.4+, and an Authyo account with an App ID, Client ID and Client Secret.
- **Settings location:** WordPress admin, under **Authyo OTP**.
- **Safety net:** If Authyo is not set up, or your Authyo balance runs out, forms keep working without OTP so no leads are lost.
- **Get the plugin:** [WordPress.org: Authyo OTP for WPForms](https://wordpress.org/plugins/authyo-otp-for-wpforms/)

## Overview

**Authyo OTP for WPForms** adds a one-time-password check to your WPForms forms. Visitors verify their email address or phone number before the form can be submitted, which reduces spam and fake submissions.

You add OTP with a normal form field. In the WPForms builder, drag an **Authyo** field into your form. OTP verification is switched on automatically for any form that contains one. No extra setting is needed.

_This plugin is an independent add-on for WPForms, developed by Konceptwise Digital Media Pvt. Ltd. It is not affiliated with, endorsed by or supported by WPForms._

- **Three Authyo fields:** Verify an email address, a phone number, or let the visitor type either one in a single smart field.
- **Four OTP channels:** Email, SMS, WhatsApp and Voice Call. Voice Call is currently available in India only.
- **Fallback methods:** If the code does not arrive, visitors can try another way after a short wait. You can also show every channel as a button from the start.
- **Multi-page forms:** Optionally stop visitors from moving to the next page until the Authyo fields on the current page are verified.
- **Country selector:** Choose all countries or only the ones you serve, and preselect a default country.
- **Advanced phone validation:** Optional real-time checks on number format, length and type for the selected country.
- **Google Sheets sync:** Send form entries to a Google Sheet, with your own column mapping.
- **Fail-safe protection:** If Authyo is not configured or your balance is used up, submissions continue without OTP, so no leads are lost.

## Requirements

- WordPress **5.5** or later and PHP **7.4** or later.
- **WPForms** (Lite or Pro) installed and activated.
- An **Authyo account** with an application. You will need its **App ID**, **Client ID** and **Client Secret**.
- Balance in your Authyo wallet to send OTPs.

## Installation

Install WPForms first, then the Authyo add-on.

### Step 1: Install and activate WPForms
Go to **Plugins → Add New**, search for **WPForms**, then click **Install Now** and **Activate**. Skip this step if it is already active.

### Step 2: Install Authyo OTP for WPForms
Go to **Plugins → Add New**, search for **Authyo OTP for WPForms**, then click **Install Now** and **Activate**. You can also upload the plugin ZIP using **Plugins → Add New → Upload Plugin**.

### Step 3: Open the plugin settings
A new **Authyo OTP** item appears in the WordPress admin menu. The settings page has six tabs: **General**, **Verification Methods**, **Google Sheets**, **GS Setup Guide**, **How to Use** and **Support**. An interactive tour starts on first use.

## Setup

Connect the plugin to your Authyo account and choose how OTPs are sent.

### Step 1: Create your Authyo account
Go to [app.authyo.io](https://app.authyo.io/account/welcome) and create a free account.

### Step 2: Copy your credentials
Open [your applications](https://app.authyo.io/application/userapplication) in the Authyo dashboard and copy the **App ID**, **Client ID** and **Client Secret**. Create an application first if you do not have one.

### Step 3: Paste them into the General tab
In WordPress go to **Authyo OTP → General**. Under **API Credentials**, enter the **App ID**, **Client ID** and **Client Secret**, then save. Use the eye icon to show or hide the secret.

_**Failsafe:** if your Authyo wallet balance runs out, the plugin automatically skips OTP verification so your forms keep working and visitors are not blocked._

### Step 4: Choose your verification channels
Under **Verification Channels** switch on **Email**, **SMS**, **WhatsApp** and **Voice Call**. Pick a **Primary Channel (Phone)**. Voice Call is currently available only for India.

### Step 5: Set the country list (optional)
Under **Country Selection** choose **Select All Countries** or **Select Specific Countries**, and set a **Default Country** that is preselected in the phone field.

## How to use

OTP is added with a form field, not a shortcode. Edit a form in WPForms and look for the Authyo fields in the **Fancy Fields** section.

### Step 1: Edit your form
Go to **WPForms → All Forms** and open the form you want to protect, or create a new one with **WPForms → Add New**.

### Step 2: Add an Authyo field
In the **Fancy Fields** section, drag one of these into your form: **Authyo Email** to verify an email address, **Authyo Phone** to verify a phone number by SMS, WhatsApp or Voice Call, or **Authyo Email / Phone**, a smart field that detects whether the visitor typed an email address or a phone number.

### Step 3: Set the field options
Click the field and adjust its options. The **Authyo Email** field has an optional **Target Email Field ID**. Leave it empty and the plugin finds the email field automatically, or enter the ID of the email field you want to verify. Use the **Required** toggle to make verification compulsory.

### Step 4: Save and test the form
Save the form and open it on your site. Enter an email address or phone number, request the code, type the code you receive and submit the form. OTP is on automatically for any form that contains an Authyo field.

_Use cases: verify emails on registration forms, confirm customer emails on order or booking forms, protect contact forms from spam, and confirm attendees for events and webinars._

## Settings reference

Every setting in the plugin, grouped by the tab where you find it under **Authyo OTP**.

### General: API credentials

- **App ID**: The App ID of your Authyo application.
- **Client ID**: The Client ID of your Authyo application.
- **Client Secret**: The Client Secret of your Authyo application. Use the eye icon to show or hide it.

### General: verification channels

- **Email, SMS, WhatsApp, Voice Call**: Switch on the channels you want to offer. Voice Call is currently available only for India.
- **Primary Channel (Phone)**: The channel used first for phone numbers: SMS, WhatsApp or Voice Call. Fallback options appear after 1 minute.
- **Allow visitor to choose method**: When on, visitors see a button for each enabled channel (SMS, WhatsApp, Voice) straight away, instead of a single “Send OTP” button.
- **Strict Validation (Multi-page Forms)**: When on, visitors cannot move to the next page of a multi-step form until the Authyo fields on the current page are verified.
- **Advanced Phone Validation (libphonenumber)**: Uses Google’s phone number library to check the number format, length and type (mobile or landline) for the selected country. It adds about 150 KB to pages with phone fields.

### General: country selection

- **Select All Countries / Select Specific Countries**: Show every country in the phone field dropdown, or only the ones you choose. Search to find a country, and the count of selected countries is shown.
- **Default Country**: The country preselected in the phone number dropdown. Visitors can still change it.
- **Country List Cache**: The country list is cached for speed. Use **Refresh Cache** to fetch the latest list. If the list fails to load, check your API credentials.

### General: OTP defaults

- **OTP Length** (Default: 6): Number of digits in the code. Allowed range: 4 to 8.
- **Expiry (minutes)** (Default: 5): How long a code stays valid. Allowed range: 1 to 10.
- **Resend Cooldown (seconds)**: How long visitors must wait before requesting another code. Allowed range: 10 to 120.
- **Max Resends** (Default: 3): How many times a visitor can request a new code. Allowed range: 1 to 5.

### Form fields (in the WPForms builder)

- **Authyo Email**: A field that sends an OTP to an email address. Options: **Target Email Field ID** (optional) and **Required**.
- **Authyo Phone**: A field that sends an OTP to a phone number by SMS, WhatsApp or Voice Call, with a country selector.
- **Authyo Email / Phone**: A smart field. The visitor types an email address or a mobile number, and the plugin detects which one it is.

### Google Sheets

- **Enable Google Sheets Integration**: The master switch for the integration.
- **Google Apps Script Web App URL**: The Web App URL from your Google Apps Script deployment. See the Google Sheets guide below.
- **Sync to Sheets (per form)**: Choose which WPForms forms send their entries to Google Sheets.
- **Sheet Tab Name (per form)**: Optional tab name. Empty means the form title is used.
- **Form Field Mapping**: Match each WPForms field to the column heading you want in the sheet. Empty means the field label is used.

## Send entries to Google Sheets

Entries from your forms can be added to a Google Sheet. The plugin’s **GS Setup Guide** tab includes the script to paste in step 3.

### Step 1: Create a sheet
Create a new Google Sheet.

### Step 2: Open Apps Script
In the sheet, go to **Extensions → Apps Script**.

### Step 3: Paste the script
Delete any existing code and paste the script from **Authyo OTP → GS Setup Guide** (use the **Copy to clipboard** button).

### Step 4: Deploy as a web app
Click **Deploy** and select a new deployment. Choose type **Web App**, set **Execute as** to **Me** and **Who has access** to **Anyone**. Click **Deploy**, authorize the script, and copy the **Web App URL**.

_If you edit the script later, use **Deploy → Manage Deployments**, click the pencil (Edit) icon and choose **New version**._

### Step 5: Paste the URL into the plugin
In WordPress open the **Google Sheets** tab, switch on **Enable Google Sheets Integration** and paste the Web App URL.

### Step 6: Choose your forms
Under **Per-Form Sync Settings**, tick **Sync to Sheets** for each form to sync, and optionally set a sheet tab name. Under **Form Field Mapping** you can map fields to column headings.

## Troubleshooting

### I do not see the Authyo fields in the form builder
Check that WPForms is installed and active, then look in the **Fancy Fields** section of the builder. Reload the builder after activating the Authyo plugin.

### The OTP does not arrive
Check that your **App ID**, **Client ID** and **Client Secret** are correct, that your Authyo wallet has balance, that the channel is switched on in **Verification Channels**, and that the email address or phone number is valid. Voice Call works only for India.

### The form submits without asking for an OTP
If Authyo is not configured, or your Authyo wallet balance is empty, the plugin skips OTP so forms keep working. Check your credentials and top up your Authyo wallet.

### Visitors see “Verification is required. Please verify before submitting”
The visitor must verify before submitting. Ask them to request the code, enter it, and then submit.

### Visitors see “Your verification code has expired”
The code timed out. By default a code is valid for 5 minutes. Ask the visitor to request a new one, or raise **Expiry (minutes)** (up to 10).

### Visitors see “Please enter a valid verification code”
The code was wrong or in the wrong format. Check the digits against the message. The code length matches your **OTP Length** setting.

### Visitors see “Too many attempts” or “Maximum resend limit reached”
The visitor reached the limit for codes. For too many attempts, wait a few minutes. For the resend limit, refresh the page and start again. You can allow more resends with **Max Resends** (up to 5).

### Visitors see “Voice Call in the selected country is not available”
Voice Call works only for India. Ask the visitor to pick SMS or WhatsApp, or switch off Voice Call in **Verification Channels**.

### Visitors see “Verification is currently unavailable”
The OTP service could not be reached. Try again in a moment, and check your internet connection and Authyo credentials.

### A multi-page form will not move to the next page
**Strict Validation (Multi-page Forms)** is on, so the Authyo fields on the current page must be verified first. Verify the code, or switch the option off.

### The country list is empty
Check your API credentials, then open **General → Country Selection** and click **Refresh Cache**.

### Entries are not reaching Google Sheets
Check that the Web App is deployed with **Who has access** set to **Anyone**, that the Web App URL is pasted in the **Google Sheets** tab, and that **Sync to Sheets** is ticked for the form. After editing the script, deploy a **New version**.

## Frequently asked questions

### Does this plugin require WPForms?
Yes. It is an extension for WPForms (Lite or Pro) and needs it installed and activated.

### Which OTP methods are supported?
Email, SMS, WhatsApp and Voice Call. Voice Call is currently available only for India.

### Is an Authyo account required?
Yes. You need an Authyo account and an application to get your App ID, Client ID and Client Secret.

### How do I turn OTP on for a form?
Add an Authyo field (Authyo Email, Authyo Phone or Authyo Email / Phone) to the form. OTP is switched on automatically for any form that contains one.

### What is the Authyo Email / Phone field?
A smart field. The visitor types an email address or a mobile number, and the plugin detects which one it is and sends the code to the right place.

### What happens if my Authyo balance runs out?
The plugin skips OTP verification so your forms keep working and no leads are lost. Top up your Authyo wallet to turn verification back on.

### Does it work with multi-page forms?
Yes. With **Strict Validation (Multi-page Forms)** on, visitors must verify the Authyo fields on a page before moving to the next one.

### Can I limit the countries in the phone field?
Yes. Choose **Select Specific Countries** under **Country Selection**, and pick the ones you serve.

### Will it slow down my site?
The optional Advanced Phone Validation adds about 150 KB on pages with phone fields. Leave it off if you do not need it.

### Is this plugin made by the WPForms team?
No. It is developed by Konceptwise Digital Media Pvt. Ltd. and is not affiliated with, endorsed by or supported by WPForms.

## Support

If this guide does not answer your question, submit the support form: https://authyo.io/support/
