One-Time Passwords Explained: How to Use OTPs Safely

You have probably typed an OTP today. A six-digit code arrives, you enter it, and the site lets you in or confirms a payment. It feels routine, which is exactly why scammers target it. This guide explains what the code is actually doing, the situations in which people get tricked into handing it over, and the habits that keep your accounts yours.

What an OTP is, in plain words

OTP stands for one-time password. It is a short code that works once, or for a short window of time, to prove that the person typing the password is also the person holding a particular phone or email inbox. A stolen password alone is not enough, because the attacker does not have the code.

There are two common ways a code is produced. In the first, the service generates a random code and sends it to you by SMS or email. In the second, an authenticator app on your phone and the service share a secret when you set it up, and both calculate the same code from that secret and the current time. The code changes about every 30 seconds, and nothing needs to be sent over the network at login time.

The important point: the code is a key to a specific action. If you are on a login screen, it opens that login. If you are on a payment screen, it approves that payment. Whoever has the code at that moment can use it for whatever the screen is asking.

Why you never share an OTP

No bank, college, delivery service, employer or recruiter needs you to read an OTP to them. The service sent the code to you so that you can type it into its own screen. If someone else asks for it, they are doing something with your account right now, and they need your code to finish.

Most OTP messages state this in the text, and many include what the code is for. Read the message rather than only the digits. A code labelled "login to your mail" that arrives while you are on a call with a "recruiter" is a warning sign.

Sharing a code also has a practical cost. Banks and services often treat a transaction approved with your OTP as authorised by you. Check your own bank's terms, because they vary, but assume that handing over a code is hard to undo.

Common tricks to get your code

The "wrong number" or support call

Someone calls claiming to be from your bank, the college accounts section, or a courier, and says there is a problem. During the call they trigger a real OTP on their end, then ask you to read it out "to verify your identity". The code is real, which makes the call feel genuine.

The fake job, scholarship or refund

"To confirm your registration we will send a code, please share it." Or a refund that needs a code before the money "arrives". Money arriving in your account never requires you to give out a code. If you must approve something to receive a payment, it is not a refund.

Look-alike login pages

You get an email asking you to sign in to view a document. The page looks right, you enter your password, and it asks for the code. The attacker is typing your details into the real site at the same moment and needs your code to get past the check. If you ever find yourself on a login page you reached from an email, close it and type the address yourself. The guide to phishing emails for students covers the link-checking habits in detail.

Code fatigue

Some services send a push approval request or a code over and over, hoping you will tap "approve" just to make it stop. If you receive requests you did not start, do not approve them, even once.

The friend who "needs help"

A message from a contact, who has been hacked, asking you to forward a code that was "sent to your number by mistake". That code is for their account recovery. Do not forward it.

SMS, authenticator app, or email: how they compare

MethodStrengthsWeaknesses
SMS codeWorks on any phone; nothing to install; easy for anyone to useDepends on your mobile number and network. SIM swap, where someone convinces a carrier to move your number, is a known attack. Messages can show on a locked screen
Authenticator appCodes generated on your device; no phone signal needed; not tied to your phone numberYou need to set it up and keep it. Losing the phone without backup codes can lock you out
Email codeConvenient when you already read email constantlyOnly as safe as that mailbox. If your email is compromised, so is every code that arrives there
Passkey or security keyDesigned to resist fake login pages; nothing to typeNot supported everywhere; you need to understand how to recover the account if the device is lost

If a service lets you choose, an authenticator app is usually a better option than SMS, and a passkey or hardware key is better again where offered. Any form of two-step verification is better than none. Your email account deserves the strongest option you can set up, because password resets for almost everything else land there.

Expiry and what it means

Most OTPs expire after a short time, often between a few minutes and ten, though the exact period is up to each service. Authenticator codes rotate every 30 seconds or so. Expiry helps by limiting how long a stolen code is useful, but it does not protect you from a live scam, since the attacker will use it within seconds.

If a code does not arrive, wait for the stated time before requesting another. Each new request usually invalidates the previous one. Asking repeatedly can also lock a login temporarily.

You received a code you did not request

An unexpected code means that someone, or something, typed your phone number or email into a login or payment screen. Usually it is a mistaken entry by a stranger or a bot testing numbers. It can also mean someone has your password and is trying to use it.

  1. Do not share it, tap any link in the message, or reply to it.
  2. If the sender is a service you use, open that service yourself and change your password. Check the recent login activity.
  3. If you also get a phone call asking for the code, hang up. A real organisation would not need it.
  4. If it was a bank code for a transaction you did not make, call the bank using the number printed on your card or the bank's own site, and ask them to block it.
  5. If several of these arrive at once, assume your password is known, and change it everywhere you reused it.

Backup codes and getting locked out

When you turn on two-step verification, most services offer a set of backup codes. Each one works once if you lose your phone. Save them somewhere other than the phone: printed and kept with important documents, or in a password manager protected by a strong master password. Do not keep them in your inbox, since anyone who gets into your email would find them.

Before you change phones, move your authenticator app accounts across using the app's own transfer or backup feature, and confirm that it works before wiping the old phone. Also keep your recovery email and phone number current on your main accounts. Students who change numbers when they change SIM plans often discover this only after they are locked out.

Reading codes in your inbox

If you use a mail tool or a summary app, remember that it can see messages that contain codes. Reputable ones should not store or forward them, but it is worth checking in the privacy policy how your mail is handled. 2Sentence, for example, works read-only and discards email text after summarising, but wherever you connect your mail, follow the same rule: never paste a code into a chat, a form or another message. The article on what apps can read in your email explains the questions to ask.

Quick checklist

Written and reviewed by the 2Sentence team. Menus and settings in Gmail, Outlook and other products change, so if a name differs on your screen, use your account's own help. See how we write and update these articles.

Keep reading

How to Spot Phishing and Scam Emails Aimed at Students and Job Seekers

Fake offer letters, scholarship scams and fake fee links target students. Learn the red flags, how to check an email safely, and what to do if you already clicked.

8 min read

What Email Apps Can Read: Access Permissions, OAuth and How to Revoke Them

What it means when an app asks to connect to your email, how read-only differs from full access, how to remove access in Google and Microsoft, and what to ask first.

7 min read

A 10-minute inbox routine for college students

A minute-by-minute daily email routine for students, plus a weekly deeper pass, a plan for clearing a backlog after a break, and the mistakes that undo it.

8 min read