To add a 2FA account manually, find the text "setup key" or "secret key" the service shows next to its QR code, choose manual entry in your authenticator, type the key exactly as shown, give the account a name, and confirm with the first code the app produces. The key is the same secret a QR code carries, just as text.
You need manual entry when there is no camera, when the QR code is on the same device as the authenticator, or when a service only offers a text key. This guide covers where to find the key, what to enter, and how to fix codes that do not match.
What the secret key is
When a service enables authenticator-app 2FA, it generates a random secret and shares it with you once. Your authenticator and the service both use that secret, plus the current time, to compute matching codes. The secret is usually written in Base32: letters A to Z and digits 2 to 7, often in groups of four, for example JBSW Y3DP EHPK 3PXP.
RFC 4226 requires a shared secret of at least 128 bits and recommends 160 bits, which is why real keys are fairly long, commonly 16 to 32 characters or more. A very short key is a sign you may have copied the wrong thing.
Treat the key like a password. Anyone who has it can generate your codes. Do not paste it into chats, emails or unfamiliar websites. If you wonder whether a website is a safe place for it, read is it safe to enter your 2FA secret online?
Where to find the key
On the service's 2FA setup page, near the QR code, look for text such as:
- "Can't scan the QR code?"
- "Enter this code manually"
- "Setup key" or "Secret key"
- A link that reveals a string of characters
Click it and the key appears. If the service does not show a key and offers only a QR code, you can read the QR code image to extract it, see what is an otpauth:// QR code.
If you set up 2FA long ago and did not save the key, you generally cannot view it again. The usual fix is to turn 2FA off and on again, which produces a new secret.
Step-by-step: adding the account manually
- Open the service's 2FA setup and choose the authenticator app option. Reveal the setup key.
- Open your authenticator and choose manual entry (in 2Fa Live, the add-manually option).
- Enter the account details.
- Issuer: the service name, for example "Google".
- Account name: your email or username at that service.
- Secret key: the Base32 key.
- Check the settings. Leave defaults unless the service says otherwise: time-based (TOTP), SHA-1, 6 digits, 30 seconds. See the table below.
- Save. The authenticator begins generating codes.
- Confirm. Type the current code into the service before it expires. If accepted, setup is complete.
- Save recovery codes and make an encrypted backup. See secure backups.
Settings that must match
The otpauth format documents these parameters and their defaults:
| Setting | Options | Default | Notes |
|---|---|---|---|
| Type | Time-based (TOTP) or counter-based (HOTP) | TOTP | HOTP also needs a starting counter |
| Algorithm | SHA1, SHA256, SHA512 | SHA1 | Almost all services use SHA1 |
| Digits | 6 or 8 | 6 | Match the service |
| Period | Seconds per code | 30 | TOTP only |
If the service does not specify, use the defaults. The difference between the two types is explained in TOTP vs HOTP. Mismatched settings are a classic reason for a correct secret producing wrong codes.
Typing the key correctly
One wrong character gives a completely different stream of codes. To avoid mistakes:
- Copy and paste when possible. Use copy rather than retyping, but only into a place you trust.
- Watch look-alikes. Base32 uses only the letters A to Z and the digits 2 to 7. The digits 0, 1, 8 and 9 never appear, so if you think you see one, it is almost certainly the letter O, I or L, or a misread character.
- Ignore spaces and case. Spaces are for readability; case does not change the key. Enter it without spaces if the field is picky.
- Do not add characters such as trailing punctuation from a sentence you copied.
Troubleshooting: the code is rejected
- Retype the secret. This is the most common cause.
- Fix the clock. Time-based codes depend on the current time. Set date, time and time zone to automatic. RFC 6238 describes servers accepting only a small drift.
- Match digits, period and algorithm to what the service requires.
- Wait for a fresh code. If you type one as it expires, the server may see it as late. Take the next one.
- Start over. Remove the half-working entry, restart the service's setup to get a new key, and add it again.
- Use recovery codes if you were locked out in the process.
After setup
Label the account clearly, test a real sign-in, and store recovery codes safely. Keep an encrypted backup, because a manually entered account is no different from a scanned one when you lose a device. For the scan route, see the QR code guide.
Try it
You can check a secret and watch codes generate with the TOTP generator or the 2FA code generator. In 2Fa Live your secrets are encrypted in your browser with your passphrase and are not sent to a server.
Key takeaways
- The setup key is the same secret as the QR code, shown as text.
- Enter it exactly, keep defaults unless told otherwise and confirm with a live code.
- Wrong codes usually mean a typo, a wrong clock or mismatched settings.
- Treat the key like a password and save recovery codes and a backup.
Tags: manual entry, secret key, setup key, guide, base32