Set up 2FA on X (Twitter)
Turn on 2FA on X (Twitter) under Settings and privacy › Security and account access › Security › Two-factor authentication › Authentication app. It takes about two minutes and is available to every account; text-message 2FA is only for Premium subscribers.
- Time
- About 2 minutes
- Where
- X app or website
- Setting
- “Authentication app”
Path: X › Settings and privacy › Security and account access › Security › Two-factor authentication
Before you start
- Your X password. Accounts created with Google or Apple sign-in may need to set a password first.
- A verified email or phone on the account.
- A computer, or use “Can’t scan the QR code?” to copy the key on your iPhone.
Turn on 2FA for X, step by step
- 1
Open Two-factor authentication
On x.com: More › Settings and privacy › Security and account access › Security › Two-factor authentication. Same path in the app under Settings and privacy.
- 2
Choose Authentication app
Check “Authentication app”, tap Get started and enter your password. X shows a QR code; “Can’t scan the QR code?” reveals the key.
- 3
Scan it with 2FA Setup
Tap Scan below and point the camera at the QR code, or use Enter key with the text key. Enter the 6-digit code from 2FA Setup on X and tap Confirm.
How scanning works - 4
Save the backup code
X shows a single backup code at the end. Copy it somewhere off your phone. You can generate a new one later in the same menu.
Scan the X QR code with 2FA Setup
Open 2FA Setup and tap +. The camera opens straight away: point it at the QR code X shows. If you are setting up on the same iPhone, take a screenshot and choose From Photos, or copy the text key and choose Enter key. Spaces and lowercase letters in the key are fine.
2FA Setup reads the algorithm, digit count and period from the QR code, shows “X is protected” and your first code. Enter that code on X to finish. Your secret is stored in the iPhone Keychain and never leaves the device.
Free for up to 5 accounts. Pro is $49.99 once for life, or a plan.
Other 2FA options on X
X offers an authentication app, security keys (and passkeys) for everyone, and text message codes for Premium subscribers only.
Where the codes are, and your backup codes
Your code appears in 2FA Setup as “X” with your @handle. It changes every 30 seconds.
X gives one backup code at a time. Find it again or generate a new one in Two-factor authentication › Backup codes. Each code works once.
If you lose both your authenticator and the backup code, X’s support form for locked accounts is the only path, and it can be slow.
Why the codes work without internet
When you scan the QR code, X and your iPhone share a secret key. Every 30 seconds both sides combine that key with the current time and get the same 6-digit number (the TOTP standard, RFC 6238). Nothing is sent between them, which is why codes work in airplane mode and why the clock matters: if your iPhone time is off, the numbers no longer match. You can watch it happen with our TOTP generator.
X 2FA questions
Why did X turn off my text-message 2FA?
Since 2023 X only allows SMS two-factor for Premium subscribers. Accounts without Premium need an authentication app or a security key. Set up 2FA Setup using this guide.
X says my code is wrong.
Make sure your iPhone sets the time automatically and use a fresh code. If you set up 2FA again, only the newest entry in 2FA Setup works; delete the old one.
Will turning on 2FA log me out of X?
No. Existing sessions stay logged in. New logins ask for a code.
Does the backup code expire?
It stays valid until you use it or generate a new one. After you use it, generate a new one right away.
Official source: X Help: How to use two-factor authentication. Menus change; if a label differs from this guide, tell us at support@2fasetup.app.