How to Turn On Two-Factor Authentication for X (Twitter)

By Information Security Asia · Updated November 21, 2026 · 4 min read

Short answer: on X, go to Settings and privacy > Security and account access > Security > Two-factor authentication, choose Authentication app or Security key, follow the prompts and save the backup code. Text message 2FA is limited to X Premium subscribers, but authentication apps and security keys are free, stronger and not vulnerable to SIM swaps.

Account takeovers on X are frequently used to promote crypto scams and phishing links to the victim’s followers. Two-factor authentication means a stolen password alone is not enough to log in.

How to Turn On Two-Factor Authentication for X (Twitter)

Why X restricted SMS 2FA

In 2023, X announced that text-message two-factor authentication would only be available to subscribers, citing abuse of SMS by bad actors. For most users this is a nudge in the right direction: SMS codes can be intercepted through SIM swapping, as several well-known account takeovers have shown, while authentication apps and security keys avoid that weakness. If you previously used SMS 2FA without Premium, X disabled it, so check that your account still has 2FA turned on.

Set up an authentication app

  1. Install an authenticator such as Google Authenticator, Microsoft Authenticator or Authy, or use your password manager.
  2. In X, go to Settings and privacy > Security and account access > Security > Two-factor authentication.
  3. Select Authentication app and tap Get started. Confirm your password.
  4. Scan the QR code with your authenticator app, or enter the setup key manually.
  5. Enter the six-digit code shown in the app and confirm.
  6. Save the backup code X shows you somewhere safe, such as your password manager or on paper.

Set up a security key

Choose Security key in the same menu and follow the prompts to register a FIDO-compatible key via USB or NFC. X supports security keys on the web and in its mobile apps. Register a backup key as well. Security keys offer the strongest protection, because they will not work on a fake login page. See setting up a hardware security key.

Passkeys

X also supports passkeys on many devices, which let you log in with your fingerprint, face or device PIN. A passkey can replace your password for sign-in and is phishing-resistant.

Backup codes and recovery

Your backup code lets you log in if you lose access to your authenticator app or key. You can generate a new code in the 2FA settings, which replaces the old one. If you lose both your 2FA method and backup code, you may need to contact X support through the help centre, and recovery is not guaranteed, so keep the code safe.

Changing phones

Before resetting or giving away an old phone, transfer your authenticator app’s accounts using its export or cloud backup feature. Alternatively, sign in on the new phone using your backup code and set up the authenticator again.

How to Turn On Two-Factor Authentication for X (Twitter)

Strengthen the rest of your account

Two-factor authentication works best combined with a unique password, password reset protect (which requires your email or phone to start a reset), regular review of active sessions, and removing connected apps you do not use. See securing your X account.

Watch for 2FA phishing

Attackers increasingly use fake login pages that ask for both your password and your 2FA code in real time. X will never DM you asking for a code or ask you to log in through a link to avoid suspension. Always log in by opening the app or typing x.com yourself. Security keys and passkeys defeat these attacks.

Common mistakes to avoid

A few habits undermine two-factor authentication on any platform, including X. Taking a screenshot of the QR code during setup and leaving it in a cloud-synced photo library lets anyone with access to those photos generate your codes. Storing the backup code in the same email account that X uses for password resets means one compromise unlocks both. Approving login prompts or entering codes on pages you reached from a DM or email link hands them straight to an attacker. And forgetting to move the authenticator to a new phone before wiping the old one is the most common cause of lockouts.

For accounts that matter, such as a business profile, a public figure’s account or one with a valuable handle, combine a security key with a passkey, keep a second registered key in a safe place, and limit who knows the account’s email address.

Frequently asked questions

Is two-factor authentication free on X?

Yes, with an authentication app or security key. Only SMS 2FA requires Premium.

What if I lose my phone with the authenticator app?

Use your backup code to log in, then set up the app on your new phone and generate a new backup code.

Can I use more than one 2FA method?

Yes. You can enable both an authentication app and security keys.

Does 2FA protect my DMs?

It protects the account login, which in turn protects DMs. Connected apps with DM permissions can still read them, so review those.

Sources

Keep reading