X (Twitter) backup code and 2FA: which code goes where

X can ask for three different codes: one from an authentication app, one sent by text, or a backup code. Knowing which one the login screen wants solves most problems.

The three codes X uses

  • Authentication app code: six digits from an app such as Google Authenticator or Authy, changing every 30 seconds.
  • Text message code: sent to your phone number. Since 2023 X has offered SMS two-factor only to X Premium subscribers, so many accounts no longer have it.
  • Backup code: issued by X for the times your usual method is not available.

Your password is none of these, and none of them can be turned into another.

Finding your backup code

While logged in, go to Settings and privacy, Security and account access, Security, Two-factor authentication, and open Backup codes. X asks for your password first. Generating a new backup code replaces the previous one.

Write it down or keep it in a password manager, not only on the phone that holds your authenticator.

Setting up an authentication app

  1. Open Settings and privacy, then Security and account access, Security, and Two-factor authentication.
  2. Choose Authentication app and confirm your password.
  3. Scan the QR code with your app or type the key in manually, then enter the code the app shows.

Entries made years ago may still be called “Twitter”. That is fine as long as it is the entry created for this account.

When X rejects the code

  • Read which code the screen asks for. An app code typed where X expects a backup code, or the other way round, fails every time.
  • Set your phone’s date and time to automatic.
  • If you set up 2FA again after changing phones, the old entry is dead even though it still shows numbers.
  • Several X accounts in one app? Match the username, not just the icon.

Locked out

Use your backup code if you saved one. If not, X’s help page on login authentication problems explains the options it offers; X does not promise to restore access without a working method. No outside website can look up an X backup code for you.

If you kept the original setup key, our TOTP code generator shows the current code from it without sending anything off your device.

References