Messenger keeps asking for a PIN? How to restore your chats
Messenger asks for a PIN because your encrypted chats live in a backup that has to be unlocked on each new device. Meta lists five ways to restore them, and a rule about resetting a forgotten PIN.

Photo by Asterfolio on Unsplash
You log in to Messenger on a new phone or a computer, and it stops you with a request for a PIN you do not remember setting. Or you get in, and your chats are not there. Both come from the same place: the restore step for encrypted chats.
Why Messenger asks for a PIN
Meta says your end-to-end encrypted chat history is stored in your Messenger backup. When you switch devices, you need to enter your PIN to restore your chat history. The Help page on restoring says that when you log in on a new device, you need to restore your encrypted chats saved in your backup using the security method you chose. Meta also says it cannot read encrypted messages stored in your backup, which is why it cannot just hand them back to you.
That is why the prompt is not a glitch. It is how Messenger keeps old encrypted chats private. It also explains why one phone can seem to remember you and another keeps asking: only a device that has restored the backup can show those chats.
| Method | What you need |
|---|---|
| PIN | The PIN you created in Messenger |
| Apple account | An iPhone or iPad. iOS only |
| Google account | An Android phone. Android only |
| 40-character code | The code you generated and saved earlier |
| One-time code | A mobile device where you recently used Messenger |
The fix
5 ways to get past the PIN prompt
- 1
Enter your PIN.
It is the PIN you created for encrypted chats. Meta says that when you log in on a new device you will be asked to enter it to restore your chat history.
- 2
Use your Apple or Google account.
If you chose one as your security method, Meta lists the Apple account for iOS and the Google account for Android as restore options.
- 3
Use a 40-character code.
If you saved one, enter it when asked. You can generate a new one on a device that is still signed in: Menu › Settings › Privacy and safety › End-to-end encrypted chats › Chat history › Other ways to restore › Generate 40-character code.
- 4
Use a one-time code.
Meta says it is sent to the Messenger app on any mobile device where you recently used Messenger. On messenger.com, log in, click Use a one-time code instead, then tap This was me on the phone and enter the code on the computer.
- 5
Reset the PIN on a device that already has it.
On a device where you created or previously entered the PIN, go to Menu › Settings › Privacy & safety › End-to-end encrypted chats › Message storage › PIN › Reset PIN.
I forgot my Messenger PIN
Meta's page on forgotten PINs is blunt: Messenger can't reset your PIN or restore your backup for you. That is the cost of encryption. It also says you must reset the PIN on a device where you either created it or previously entered it. So the first thing to do is find your old phone, or any device where Messenger is still signed in and works.
If you have such a device, open Menu, then Settings, then Privacy & safety, then End-to-end encrypted chats, then Message storage, then PIN, and choose Reset PIN. If you do not have one, the other route Meta gives is a one-time code, which needs a mobile device where you have previously used Messenger. If you have neither, Meta's pages do not describe another way, so we cannot promise one.
My Messenger chats are missing on a new device
In Meta's wording, restoring lets you see all of your Messenger chats on your new device. So missing chats usually mean the restore has not been completed. Go back to the prompt and finish it with one of the five methods. If Messenger never showed a prompt, check that the old chats were end-to-end encrypted ones, and that you are logged in to the same account on both devices.
One thing Meta does say: deleting messages from your backup permanently removes them and you can't recover them. So do not delete anything from the backup while you are troubleshooting. For other missing-message cases, see our guide to seeing deleted Messenger messages.
How to set up a PIN before you switch phones
The best time to fix this is before you need it. On your current phone, open Menu, then Settings, then Privacy & safety, then End-to-end encrypted chats, then Message storage, then PIN, and tap Create PIN. Meta says you will only see these steps if you do not already have a PIN. Enter it twice. Write it somewhere safe, and consider generating a 40-character code and saving that too.
- Create a PIN you will remember, and store it in a password manager.
- Generate a 40-character code and keep it with your important documents.
- Keep your old phone signed in until the new one has restored its chats.
- If you use an iPhone or Android, check whether an Apple or Google account restore option is available to you.
Which method fits your situation?
| Your situation | Best method | Why |
|---|---|---|
| You remember the PIN | Enter the PIN | It is the quickest way to restore |
| Old phone still signed in | Reset the PIN there, or generate a 40-character code | Meta says a reset needs a device where you created or entered the PIN |
| Old phone lost, another phone has Messenger | One-time code | It goes to any mobile device where you recently used Messenger |
| You saved a 40-character code | Enter the code | It works on any new device |
| You chose an Apple or Google account | Use that account | Meta lists them as iOS and Android options |
Using Messenger on a computer
The prompt also appears on messenger.com. Meta's one-time code page says that you log in on the computer, click Use a one-time code instead, and, if you have a 40-character code, click More options first. Then you tap This was me on your phone and enter the code on the computer. It also says you can't receive a one-time code on a computer, so the code always has to go to a phone. If you have no phone with Messenger on it, the PIN, the 40-character code or your account are your remaining options.
Before you sell, reset or lose your phone
A phone that is still signed in is your best key. Before you factory reset an old phone or trade it in, make sure the new phone has restored all of its encrypted chats, and that you have either your PIN or a saved 40-character code. Once the old phone is wiped, you lose the option of resetting the PIN from it. For help with the rest of the move, read how to back up an iPhone or how to back up an Android phone. Those backups do not replace Messenger's own encrypted chat backup, so do both.
Why does it keep asking?
Meta's pages do not explain a prompt that returns again and again. People in forums say the PIN was set on a different device and that they cannot find it on the current one, and a few say the prompt behaved differently on messenger.com or in a different interface. Those are reports, not confirmed by Meta. A repeating prompt usually means the restore never finished. Finish it, and then check Menu › Settings › Privacy & safety › End-to-end encrypted chats to see the storage method you have in place.
If the app itself is slow, crashes or will not send, that is a separate problem. Our guide to Messenger problems in general covers it.
Beware of scams that offer to restore your chats
Because people get stuck here, scammers go after them. Meta says Messenger can't reset your PIN or restore your backup for you, so nobody else can either. Do not enter your PIN, your 40-character code or a one-time code anywhere except Messenger itself. Anyone who offers to "recover your chats" for a fee, or sends a link to a page that asks for your code, is not helping. Learn to recognize these messages in our guide to how to spot scam texts.
Frequently asked questions
Why does Messenger keep asking for a PIN?
Meta says your end-to-end encrypted chat history is stored in your Messenger backup. When you log in on a new device you must restore it with the security method you chose, such as a PIN.
What if I forgot my Messenger PIN?
Meta says Messenger can't reset your PIN or restore your backup for you. Reset it on a device where you created it or previously entered it, or restore with a one-time code from a device you recently used.
How do I restore Messenger chats with a one-time code?
Meta says the code goes to the Messenger app on a mobile device where you recently used Messenger, not to a computer. On messenger.com choose Use a one-time code instead, then tap This was me on the phone.
Why are my Messenger chats missing on a new phone?
Restoring is what makes your encrypted chats appear on a new device. Finish the restore with your PIN, account, 40-character code or a one-time code.
What to try next
Sources
Official pages these steps are based on. Menus can differ by software version.
People also ask
What does Session Expired mean on Facebook?
Your login was ended, so you need to sign in again. It happens after a password change, after long inactivity, when cookies are cleared, or when Facebook detects unusual activity.
Read the full guide: Facebook keeps logging me outWhy won’t my message send to one person?
They may have blocked you, deactivated their account or restricted who can message them. If messages to everyone else work, the problem is on their side.
Read the full guide: Messenger not workingCan I see a message someone unsent?
Not in Messenger. If your notification showed it first, Android notification history or the iPhone lock screen may still hold the preview.
Read the full guide: See deleted Messenger messagesWhy can’t I change my name on Facebook?
You changed it within the last 60 days, or the new name breaks Facebook’s rules, such as unusual characters, titles or words that are not a name.
Read the full guide: Change your name on FacebookRelated guides

Facebook keeps logging me out
Facebook keeps logging you out or saying Session Expired? Check your account is safe, then fix the app or browser with 8 steps that stop the logouts.

Messenger not working
Facebook Messenger not working or messages stuck on sending? Check for an outage, turn off data saver, allow background data and try 6 more fixes that work.

See deleted Messenger messages
Find deleted Messenger messages in Archived chats, your notification history or a Facebook data download. And the truth about seeing messages someone unsent.

Change your name on Facebook
Change your name on Facebook in Accounts Center on your phone or computer. Learn the 60-day rule, Facebook’s name policy and how to add a nickname instead.
More guides you may need

Play Store download pending
Google Play stuck on Download pending? Cancel other updates in the queue, check the Wi-Fi only setting and storage, clear Play Store cache and try 4 more fixes.

Hide following on Instagram
Instagram has no switch to hide your following list, but a private account, removing followers and blocking do the job. Here is how to use each one.