How to set up 2FA on X (Twitter)
Checked against X (Twitter)'s own help on 10 October 2026. Menus change, so follow the nearest label if yours differs.
Short answer
Open X (Twitter)'s security settings (Settings and privacy, Security and account access, Security), choose the authenticator app option, and scan the QR code X (Twitter) shows with KeyNesta (or enter the setup key by hand). Type the six-digit code KeyNesta shows back into X (Twitter) to finish, and save the recovery material X (Twitter) gives you before you close the page.
Before you start
Have KeyNesta open and unlocked before X (Twitter) shows the QR code, so the code is ready the moment it appears. KeyNesta needs no account to do this. It stores authenticator-app codes only: it does not do passkeys or hardware security keys, and where X (Twitter) offers those you set them up in X (Twitter) directly.
Steps
- Open Settings and privacy, then Security and account access, then Security.
- Choose Two-factor authentication and pick Authentication app. If your account has no confirmed email, X sends a code there first.
- X says any time-based one-time password (TOTP) app works. Leave the QR code it shows on screen.
- Add it to KeyNesta. Open the KeyNesta web app (or the app on your phone once it is released), unlock your vault, choose Scan QR and point the camera at the code on screen. If you cannot scan, use Import QR image, or choose Add entry to paste the setup key.
- Select Next, enter the code KeyNesta shows, and select Verify.
- Write down, print or screenshot the backup code X generates, and keep it away from the phone.
| X (Twitter) | What to know |
|---|---|
| Where to start | Settings and privacy, Security and account access, Security |
| Setup key as text | X's help page describes scanning the QR code; if the screen offers a text key, paste that into KeyNesta. |
| Recovery material | X generates a backup code automatically when you enable 2FA in the iOS or Android app, and you can have up to five active backup codes. |
| Source | X Help Center: How to use two-factor authentication |
Backup and recovery for X (Twitter)
X generates a backup code automatically when you enable 2FA in the iOS or Android app, and you can have up to five active backup codes. Using a code out of order invalidates all previously generated ones.
Save whatever X (Twitter) gives you somewhere that is not the phone holding your codes. Where to store your 2FA backup codes compares the options, and 2FA backup and sync covers backing up the KeyNesta vault itself.
Things to know about X (Twitter)
- X ended text-message 2FA for non-Premium subscribers on 20 March 2023. The authentication-app and security-key options do not have that restriction.
- X requires 2FA on the account for some features, including Creator Monetization eligibility.
Source
Menu paths on this page come from X Help Center: How to use two-factor authentication, read on 10 October 2026. KeyNesta is not affiliated with X (Twitter).
Frequently asked questions
Can I use KeyNesta as the authenticator app for X (Twitter)?
Yes. X (Twitter) asks for a standard time-based code, and KeyNesta reads the same QR code or setup key and generates that code on your device, offline. X (Twitter) does not learn which app you chose. KeyNesta holds authenticator-app codes only; it has no passkey or hardware security key support. How to add the code is in How do I add a 2FA code to KeyNesta?
What happens to my X (Twitter) 2FA if I lose my phone?
Use a backup code, or choose a different two-factor method if you added one. If your KeyNesta vault is synced or you made an encrypted backup, you can restore the codes on another device; the lost phone guide covers the order to do things in.
How do I add X (Twitter) to KeyNesta if I cannot scan the QR code?
X's help page describes scanning the QR code; if the screen offers a text key, paste that into KeyNesta. In KeyNesta you can also upload a screenshot with Import QR image, paste an otpauth:// link, or add the entry by hand with the secret. Delete any screenshot of the QR afterwards: it works like a password.
Can I use the same X (Twitter) code on two devices?
Codes come from a shared secret, so any app that holds the secret shows the same codes. The tidy way is KeyNesta's optional end-to-end encrypted sync, which carries the vault to a second device. The alternative is to add the secret to a second app while the QR code is still on screen; once X (Twitter) stops showing it, you cannot get it back without re-enrolling.
Can I use security keys with X (Twitter) as well as KeyNesta?
X lists a security key as a method next to the authentication app. KeyNesta cannot act as a security key and has no passkey support; the authentication-app code is what it holds.
Why can I not use SMS for two-factor authentication on X?
X's help page says that since 20 March 2023 text-message 2FA is only supported for Premium subscribers. The authentication app and security key methods are available to everyone, which makes an app like KeyNesta the free route.
What does X mean by using a backup code out of order?
X says you can generate up to five active backup codes, and that using one out of order invalidates all previously generated codes. Use them in the order they were issued and treat the set as a single-use list.
Try KeyNesta free. The web app needs no sign-up.
Open the web app All platforms