---
title: "One-time password (OTP)"
description: "A one-time password (OTP) is a short code that is valid for a single login or transaction, usually for a few minutes. Businesses send it by SMS, WhatsApp, voice or email, or generate it in an authenticator app, to verify that the user controls a number, inbox or device."
canonical: "https://omnichannels.ai/glossary/otp/"
language: "en"
updated: "2026-10-18"
publisher: "BroadNet Technologies"
brand: "OmniChannels.ai"
---

# One-time password (OTP)

Canonical: https://omnichannels.ai/glossary/otp/
Language: en
Publisher: OmniChannels.ai by BroadNet Technologies

**Definition:** A one-time password (OTP) is a short code that is valid for a single login or transaction, usually for a few minutes. Businesses send it by SMS, WhatsApp, voice or email, or generate it in an authenticator app, to verify that the user controls a number, inbox or device.

A one-time password is a secret that works once. A site or app uses it to check that the person controls a phone number, an inbox or a device, usually at sign-up, login, a payment or a password reset. Because the code expires after a short time and cannot be reused, an attacker who learns an old code gains nothing.

OTPs are either generated by an algorithm that both sides share or created randomly by a server and delivered over a channel. HOTP (RFC 4226) is counter-based, and TOTP (RFC 6238) is time-based, as used in authenticator apps. For messaging OTPs, the server generates a random code, stores a hash with an expiry time and an attempt counter, and sends the plain code to the user by SMS, WhatsApp, voice or email.

Good practice is well established. Use 4 to 8 digits, a validity of a few minutes, a limit on wrong attempts, a cooldown before resending, and no reuse. Keep the message short, put the code near the start, state the brand and add a warning not to share the code. Never include marketing content in an OTP message, because it can reclassify the traffic and slow delivery.

Autofill improves completion. On Android, WhatsApp authentication templates support copy-code, one-tap and zero-tap autofill, and SMS codes can be read with Google's SMS APIs. On iOS and Safari, a code in a message formatted as the web domain followed by the code can be offered as an autofill suggestion. Check each platform's documentation for the exact format.

Channel choice matters. SMS reaches almost every phone and works without data. WhatsApp supports rich autofill and works over data or Wi-Fi. Voice OTP reaches landlines and users who cannot read a screen. Email suits low-risk flows. Many businesses use channel fallback, for example WhatsApp first, then SMS, then voice, so a single failure does not block the customer.

OTP endpoints are a target for fraud. In SMS pumping, bots request codes to numbers whose revenue is shared with the fraudster, producing costs without real users. Rate-limit by phone number, IP address and device, restrict destination countries you do not serve, add a bot check before sending, and monitor the share of codes that are actually entered. A conversion rate that drops suddenly is a warning sign.

OTP is a convenience, not the strongest authentication. Codes sent over SMS can be intercepted through SIM swap or phishing, so high-risk actions benefit from additional controls such as app-based authentication or device binding. Treat messaging OTP as one layer.

OmniChannels.ai sends OTPs over SMS, WhatsApp authentication templates (one-tap, zero-tap and copy-code) and voice, and offers an OTP message generator tool.

## Example

```
482917 is your Acme verification code. It expires in 5 minutes. Do not share it with anyone.
```

## Sources

- [RFC 6238: TOTP: Time-Based One-Time Password Algorithm (IETF)](https://datatracker.ietf.org/doc/html/rfc6238)
- [Authentication templates — Meta for Developers](https://developers.facebook.com/docs/whatsapp/business-management-api/authentication-templates)
- [RFC 4226: HOTP: An HMAC-Based One-Time Password Algorithm (IETF)](https://datatracker.ietf.org/doc/html/rfc4226)