A WhatsApp code you did not ask for means someone entered your number in WhatsApp. Do not share it; your account stays safe if the code stays with you.
Why it happens
- Someone typed your number by mistake.
- Someone is trying to take your account and will soon message you asking for the code.
What to do now
- Do not share the code or the v.whatsapp.com link.
- Ignore messages asking for it, even from friends; their account may be hacked.
- Turn on two-step verification: Settings › Account › Two-step verification.
- Add an email address to the PIN so you can reset it.
If you already shared the code
- Open WhatsApp and re-register your number; this signs the other person out.
- Enter the new code you receive.
- Set up two-step verification straight away.
- Warn your contacts not to trust messages sent from your account in the meantime.
If WhatsApp asks for a PIN you never set, the attacker set one. Wait for the reset period shown, then register again.
Set up two-step verification now
- Open Settings › Account › Two-step verification.
- Choose a 6-digit PIN you will remember.
- Add an email so you can reset the PIN.
- WhatsApp will ask for the PIN now and then, which helps you remember it.
FAQ
Can someone take my WhatsApp with just my number?
Not without the code. With two-step verification on, they also need your PIN.
A friend asked for my WhatsApp code. What now?
Do not send it. Call your friend; their account is probably hacked.
How do I get my account back?
Register your number again in WhatsApp and enter the new code.
Related: WhatsApp 6-digit code · code scams · WhatsApp two-step verification.