What an OTP is
OTP stands for one-time passcode. It is usually four to eight digits, valid for a single use and a short period. Because it works only once, a stolen or leaked code is far less useful than a stolen password.
You meet OTPs in several places: confirming a new phone number, logging in from a new device, approving a payment, or resetting a password. The mechanism is the same each time, only the reason differs.
Some OTPs are not sent by SMS at all. Authenticator apps and security keys produce or confirm codes in other ways, but the SMS version remains the most familiar because it needs nothing beyond a phone number.
How an app creates and sends one
When you enter your number, the app's server generates a random code and stores a record of it, along with the number it was issued for and the time. It then hands the message to an SMS provider, which passes it through mobile networks to your handset.
You type the code into the app, and the server compares it with the stored record. If the code matches, has not expired and has not been used, the check passes and the record is discarded. Nothing about this requires the app to know anything about you beyond the number.
Delivery depends on carriers and routes, which is why a code can arrive in seconds on one attempt and take minutes on another. Apps often use more than one SMS provider and switch between them when a route is slow.
Expiry and rate limits
Codes usually expire within a few minutes. Many apps also limit how many wrong guesses you get, and how many codes can be requested for one number in an hour or a day. These limits stop attackers from guessing a six-digit code or flooding someone with messages.
For you, the practical effect is that repeatedly pressing resend can backfire. Each request may trigger a cooldown or a temporary block, and an older code can become invalid when a new one is issued. Waiting a minute or two before asking again is usually better.
Some systems also add a short delay before allowing the next code, which gets longer after each request. That is deliberate, and it is one reason a patient single request works better than many quick ones.
Why apps ask for a phone number
A phone number is a cheap but meaningful hurdle. Getting a working number takes some effort, so requiring one makes it harder to create large numbers of fake accounts for spam, scams or automated abuse.
It also supports recovery. If you forget a password or lose access, a code to your number is a convenient way to prove you are the owner. Some apps additionally use numbers to find friends or to guard against fraud on payments.
Some platforms also use the phone number as a signal for how trustworthy an account looks, so a number that the app considers high risk may be refused before any message is sent.
Where SMS codes are weak
SMS was not designed as a secure channel. Messages travel as plain text through carrier systems, and a few well-known attacks target that path. Understanding them in plain terms helps you decide how much to trust SMS for important accounts.
Treat SMS as a convenient check, not a strong lock, and prefer stronger methods where they are offered.
None of these attacks is common for ordinary users, but they are more likely to affect accounts that hold money or valuable data, which is where stronger methods matter most.
- SIM swap: an attacker persuades a carrier to move your number to a SIM they control, then receives your codes.
- Interception: codes can sometimes be intercepted through weaknesses in network signalling or through malware on a phone.
- Phishing: a fake page asks for your code and passes it to the real site in real time.
- Visible previews: codes shown on a lock screen can be read by someone nearby.
Stronger alternatives
Authenticator apps generate codes on your device and do not depend on the phone network. Hardware security keys and passkeys go further, because they cannot be handed over to a fake site. Many platforms, including Google, offer these options in account security settings.
If an account holds money, work files or your identity, move to one of these methods and keep SMS only as a backup, if at all.
What this means for one-time numbers
A single-use number can receive the first code for a sign-up, for example through GetSMSVerify, where the code appears on an order page in your browser. Since the number is not kept, it cannot receive later codes. That makes it suited to short-lived accounts and testing, not to accounts that depend on SMS for recovery.
It is also worth knowing that you should never share a code with anyone who contacts you, including people claiming to be support staff. A genuine app will not ask you to read a code back to them.
Questions
01How long is an SMS code valid?
It varies by app, but many codes expire within a few minutes. If it has expired, request a new one and wait a moment before asking again.
02Why did my code never arrive?
Causes include network delays, a rate limit after repeated requests, or the app declining to send to certain number types. Waiting briefly and requesting a single new code is better than tapping resend many times.
03Is SMS two-factor still worth using?
Yes, it is better than a password alone. For important accounts, an authenticator app or passkey is generally stronger.