OOmnistu

Blog / Security

Security

Someone is in your WhatsApp: the code rule and the way back

Registration-code scams and linked-device access: why the 6-digit WhatsApp registration code is never shared, what an unexpected code message means, how to force an intruder out, and the settings that make a repeat unlikely - from WhatsApp's own help pages.

OOmnistu
Reviewed 2026-11-20 · 5 min read

The remote takeover - the kind that needs nothing but your phone number and one moment of trust - runs through one small number: the 6-digit registration code WhatsApp texts or calls to your phone. WhatsApp's own pages are blunt about it - never share that code with anyone, not even friends or family, because without it nobody can register your number on their phone. With it, they can. The classic setup is social: a message from a contact (usually hijacked themselves) saying they sent you a code "by mistake", or a caller claiming to be from a company, asking you to read out the SMS that just arrived. The code is never for them. It is the keys, and reading it out is handing over the account.

A code you didn't ask for is a warning, not an error

If a verification code arrives out of nowhere, WhatsApp says it means someone entered your number at registration - often an honest typo, sometimes the start of a takeover attempt. You do not need to panic and you must not comply: without the code, the attempt cannot complete and you stay in control of your account. WhatsApp will also send a push notification when someone tries to register with your number. Treat both as the smoke alarm rather than the fire, and as a good moment to switch on two-step verification if you have not already.

The second door: a linked device

The code route is the one to know cold, but it is not the only door. WhatsApp can also be opened through a linked device - WhatsApp Web, a tablet, or a companion phone. WhatsApp's own page documents two ways to link one: scanning the new device's QR code with your phone, or using your phone number on the linking device and approving the pairing code it sends to your phone. Either way, linking needs your phone's approval - which is exactly what a scammer tries to borrow, whether by holding your unlocked phone for a moment, talking you into scanning a QR you should not have trusted, or some new variation on the same ask. No SMS code is involved in this route, so the code rule does not cover it. WhatsApp's own countermeasures: keep push notifications on, because you can remove a linked device you do not recognise straight from the notification; and open the Linked devices list regularly - anything unknown gets tapped, then Log out. Devices you forget about are also disconnected automatically after 30 days of inactivity, but do not wait for that.

If you're locked out: re-register, don't negotiate

WhatsApp's recovery path is short, and its own page calls re-registering the only way to remove someone: open WhatsApp, tap Log back in, enter your full international phone number, and complete registration with the 6-digit code sent to your number. The documented outcome: the moment that code goes in, anyone using your account is automatically logged out. WhatsApp's page does not present that as a cleanup of devices paired through the linked-device route, which is why the review at the end of this section still matters. Two honest caveats from that page. If you are asked for a two-step verification PIN you never set, the intruder may have set one: wait 7 days and register again - anyone using your account is still logged out once your code goes in. And changing your password does not remove someone already inside; only re-registering does. One more note worth knowing before you act: WhatsApp suggests recovering your account before reporting it, because a report can get the account banned and take your access with it. Once you are back in, finish the job: open the Linked devices list and log out of anything you do not recognise - WhatsApp recommends exactly this review after a recovery, and it is the check that catches the second door.

Tell your people, then report the fraud

A hijacked WhatsApp is an impersonation machine: the attacker chats your family and groups as you, and the ask for money usually comes quickly. WhatsApp's own advice is to notify family and friends, so say it plainly in your groups: the account was taken, it is being recovered, and any request for money or codes is not you. If anyone did send money or the fraud has a financial trail, that reporting is a separate track from the account itself: the account report to WhatsApp can wait until after you recover it, but money reporting cannot. Call your bank on its official helpline and report on 1930 or at cybercrime.gov.in - on suspicion, without waiting for proof and without waiting for the recovery to finish. One comfort from WhatsApp's documentation: with end-to-end encryption and messages stored on your device, a device that re-registers your number cannot read your past conversations.

Tonight's five minutes

Turn on two-step verification in the app's settings - an extra check at registration that a stolen code alone does not satisfy. Add your email address to the account; WhatsApp lists it as a recovery layer that works even when SMS cannot reach you. Consider a passkey, which ties the account to your fingerprint or face. And open the linked-devices list and remove anything you do not recognise. WhatsApp is clear that these layers protect an account you still hold - they cannot remove someone already inside - which is exactly why they are tonight's job, not tomorrow's. If your phone number itself was hijacked at the carrier rather than in the app, that is a different fight - our SIM-swap playbook covers it.

Sources: WhatsApp Help Center - "How to recover a compromised account" (recovery steps, the automatic log-out on re-registering, the 7-day PIN rule, the password caveat, the notify-contacts advice, the recover-before-reporting note, the past-conversations note), "Received verification code without requesting it" (what an unsolicited code means and why the attempt fails without it), "About linked devices" and "How to unlink a device" (the linked-device route and its countermeasures), "About two-step verification" and "Account security tips" (email, two-step verification, passkey and app-lock layers, and the warning that they cannot restore lost access). Fraud reporting: 1930 and cybercrime.gov.in.

Frequently asked questions

Someone messaged me a code "by mistake" and wants it back. What do I do?

That is the attack. The code that arrived on your phone registers your number on their device - reading it out or forwarding it hands over your account. WhatsApp's rule has no exceptions: never share the registration code, not even with friends or family. The polite reply is no reply.

I got a verification code I didn't request. Am I hacked?

No - per WhatsApp, an unsolicited code means someone entered your number at registration, which is often a typo and sometimes a takeover attempt. Without the code the attempt cannot complete, so you stay in control. Do not share it, and use the moment to turn on two-step verification.

Will blocking my SIM kick the attacker out of my WhatsApp?

No. WhatsApp says blocking the SIM does not log out devices from your account. Its documented way to force out someone using your account is to re-register: log back in with your number and the fresh 6-digit code, and anyone using your account is logged out when the code goes in. Then run the Linked devices review yourself.

Can I find out who took my account, or when?

No - WhatsApp says it cannot provide information about who accessed your account, or the time and location. Focus on re-registering, warning your contacts and reporting any fraud on 1930 or cybercrime.gov.in.