The setup screen is open, the QR code is sitting there, your authenticator is pointed straight at it, and nothing happens. You have cleaned the lens, moved the phone closer, moved it further away, and the camera view just keeps hunting. Meanwhile the page is warning you not to close it.

Use the text key instead. It is almost always directly under the QR code behind a link reading Can't scan?, Can't scan image?, Enter a setup key or Enter code manually, and it carries exactly the same secret the QR code carries, because the QR code is nothing more than a picture of a short piece of text.

That one fact is missing from every page currently ranking for this problem. Okta documents its own screen, WP Ghost documents its own screen, Sovos documents its own screen, and each is accurate about the buttons in front of you and silent about the mechanism underneath. So none of them can tell you why the scan is failing, which of the three different things a "can't scan" link might hand you is actually a TOTP secret, or the one thing that goes wrong after you successfully type a key in: an account that produces perfectly well-formed six-digit codes that the service refuses every single time.

This page covers all of it, in the order you need it while the setup screen is still open.

The short answer

  1. The QR code is an otpauth:// URI and nothing else. The text key under it is the secret parameter copied out of that same URI, so typing it is not a downgrade.
  2. If the QR code is on the phone you are scanning with, stop. One device cannot point its camera at its own screen. Copy the key instead.
  3. A white-on-dark QR code is an inverted code, and most in-app scanners only try dark-on-light first.
  4. A QR code needs a clear margin of four modules on every side. Cropping tight to the edges can break an otherwise perfect code.
  5. Base32 contains no 0, 1, 8 or 9. If your key appears to, you have misread O, I or L.
  6. Spaces, lower case and trailing = do not matter. A correct decoder ignores them; a character genuinely outside the alphabet is what breaks it.
  7. Not every "can't scan" link gives you a secret. Okta Verify can send an activation link instead, and Microsoft's work-account path gives a Code and a URL. Neither is a key you can type into a different app.
  8. Hand entry silently drops the digit count, the period and the algorithm that the QR code carried. That is the cause of the maddening case where the clock is right, the key was typed perfectly, and the codes are still rejected.

What that QR code actually is

A QR code opened up into a labelled otpauth URI showing type, label, secret, issuer and settings
Every part of it is text. The picture is a transport for the string, and the string is the only thing your app keeps.

Google's Key URI Format, the document every authenticator implements, gives the shape in one line:

otpauth://TYPE/LABEL?PARAMETERS

And a worked example:

otpauth://totp/Example:alice@google.com?secret=JBSWY3DPEHPK3PXP&issuer=Example

That is the entire contents of a 2FA QR code. There is no account lookup, no session, no server call. The secret parameter is, in the spec's words, "an arbitrary key value encoded in Base32 according to RFC 3548", and the spec adds that the padding described in that RFC "is not required and should be omitted".

Three consequences follow immediately, and they settle most of the confusion around this screen.

Scanning and typing are the same act. Your camera is a text input. When the scan works, your app reads that string and stores the pieces. When you type the key, you are supplying the single most important piece by hand. There is no security difference and no "proper" method.

The secret is a bearer credential with no expiry. Anything holding it can generate valid codes for that account indefinitely, offline, from anywhere. That is why a screenshot of this screen is a copy of a key rather than a copy of a picture, which is its own subject in is it safe to screenshot your 2FA QR code.

The parameters are not decoration. secret is the key, but digits, period and algorithm describe how to turn that key into the number on your screen. Hold that thought, because it is the last section of this page and the reason most of these setups fail twice.

Why the scan is failing: five causes on the display side

The camera is almost never the problem. Five things about the thing being scanned are, and they are worth ruling out in this order.

One. The QR code is on the device you are scanning with. This is the single most common version of the problem and it has no fix, because it is geometry. GMX states it in its own help with no hedging: if you display the QR code on your smartphone, "you cannot simultaneously scan the code with the authentication app". If the setup page is open on the same phone, use the copy-key route. Many services put a tap-to-open link on their mobile layout that hands the account straight to an installed app, which is the same thing done for you.

Two. The code is rendered light-on-dark. A site in dark mode may draw its QR code as white modules on a dark ground. That is an inverted code, and decoders are built to look for dark modules on a light field first. The giveaway is in the library behind an enormous number of in-app scanners: ZXing exposes a decode hint called ALSO_INVERTED, documented as "If true, also tries to decode as inverted image", which works by calling "all configured decoders ... a second time with an inverted image". A second pass that has to be asked for is not the default. If the service offers a light theme, switch to it and re-render the code.

Three. There is no quiet zone. Denso Wave, which developed the format, is explicit: "QR Code requires a four-module wide margin at all sides of a symbol", and defines that margin as "a clear area around a symbol where nothing is printed". A code butted against a dark panel edge, or a screenshot cropped exactly to the black squares, loses the frame the decoder uses to find the symbol at all.

Four. The code is too small, too dim, or behind something. This is the part the WP Ghost article gets right and it is worth repeating: raise the screen brightness, zoom the page in, hold the phone steady at a fixed distance, and switch off any blue-light filter, night shade or screen-tinting overlay. Those filters sit between the pixels and your camera and flatten the contrast the decoder depends on.

Five. The app never got camera permission. If the scanner view is black rather than busy, this is it. The app is not failing to read the code; it is not seeing anything. Check the camera permission for your authenticator in system settings before troubleshooting the code itself.

This is where vendor-specific pages help you and general advice misleads you, because the link is not one feature. It is three, and only one of them produces something you can type into any authenticator.

A base32 setup key. This is the one you want. It is a run of capital letters and digits, often shown in groups of four, sometimes labelled Secret Key, Setup Key, Manual Entry Key or just Key. Any standards-compliant app accepts it.

An activation link, which is not a secret at all. Okta Verify is the clear example, and it is why "just use the text key" is not universally true advice. Its own help page for this exact situation offers three choices behind Can't scan?: send an activation link by email, send an activation link by SMS, or "Set up manually without push notification". Only the third produces a key, with the instruction "Make note of the Secret Key. You need it later", and choosing it costs you push approvals for that account. The two link options are enrolment instructions for Okta Verify specifically. They will not go into a general authenticator, and emailing yourself one does not give you a code you can type.

A Code and a URL together, which is also not a base32 secret. This is Microsoft's work or school account path. Microsoft's own setup article routes personal accounts through "I can't scan the bar code" and work or school accounts through "Can't scan the image", and in both cases the app side is "Enter code manually". For a work account that manual form wants two values, a Code and a Url, copied off the Configure mobile app page. That pair is an Entra activation payload aimed at Microsoft Authenticator. It is not a key you can paste into a different app, and the field on the setup page that does hand out a base32 secret for third-party apps is a separate option your administrator may have disabled.

The practical rule: if the value you are given is not letters A to Z and digits 2 to 7, it is not a TOTP secret, and the vendor's own app is where it has to go.

Base32 hygiene: four characters that are never in a key

The base32 alphabet shown as A to Z and 2 to 7, with 0, 1, 8 and 9 crossed out beside the letters they are mistaken for
The absent digits are the useful part. A zero in a setup key is always a misread letter, never a zero.

Setup keys are base32, which RFC 4648 defines as characters "selected from US-ASCII digits and uppercase letters": values 0 to 25 are A to Z, values 26 to 31 are 2 to 7, and = is padding. Four decimal digits are therefore impossible in a key, and the RFC says exactly why that choice was made:

The characters "0" and "O" are easily confused, as are "1", "l", and "I".

In the base32 alphabet below, where 0 (zero) and 1 (one) are not present, a decoder may interpret 0 as O, and 1 as I or L depending on case.

So when you are reading a key off a screen and transcribing it to a phone, this is the whole of the hygiene list.

  • A 0 is the letter O. A 1 is I or L. There is no ambiguity to resolve; the digits do not exist in the alphabet.
  • 8 and 9 do not exist either. Only 2 through 7 are valid digits.
  • Spaces are presentation. Keys are grouped in fours to make them readable aloud. Apps strip whitespace before decoding, so paste the groups or close them up; both work.
  • Case does not matter. RFC 4648 describes base32 as "designed to represent arbitrary sequences of octets in a form that needs to be case insensitive", which is the point of using only capitals in the first place.
  • A trailing = is harmless but unnecessary. The Key URI spec says the padding "should be omitted", and apps that accept it simply ignore it.
  • Anything else is fatal, and deliberately so. The RFC instructs that implementations "MUST reject the encoded data if it contains characters outside the base alphabet". A stray hyphen pasted in from a formatted email is enough. KeyNesta's own error for this says it plainly: the secret must be valid base32, letters A to Z and digits 2 to 7.

If the key is rejected the instant you submit it, with no account created, the problem is in these six lines. If the account is created and the codes are refused, the problem is the next section, and it is a completely different failure.

What hand entry drops, and why good-looking codes get refused

A QR code carrying four labelled settings beside a manual form that keeps only the secret and discards the rest
The secret survives the retype. The three parameters that say how to use it do not, unless the form has somewhere to put them.

Here is the failure that sends people round the troubleshooting loop twice, and it is absent from all three pages ranking for this question.

A scan carries the whole URI. A typed key carries one parameter out of four. The other three have documented defaults, and your app will quietly assume them:

ParameterDefault assumedAllowed by the spec
secretnone, you supply itbase32, padding omitted
digits66 or 8 in the Key URI format, 6 to 8 under RFC 6238
period30 secondsany period the issuer chooses
algorithmSHA1SHA1, SHA256 or SHA512

When the service uses the defaults, which is the overwhelming majority, nothing is lost and hand entry is perfect. When the service does not, you get an account that looks completely healthy and is wrong in a way no error message explains: the right number of digits, a ticking countdown, a fresh code every half minute, and a rejection every time. The clock is fine. The key is fine. The arithmetic is being run with the wrong settings.

The clearest example is one KeyNesta handles explicitly, because it is the common non-default in consumer software: Steam Guard is five characters, not six. Type a Steam secret into a plain name-and-key form and the app will generate six digits from it forever, and Steam will never accept one. The same class of problem appears wherever an issuer has chosen eight digits, a sixty-second period, or SHA256.

Two further wrinkles are worth knowing, because they explain why this is not simply a hand-entry problem.

Some apps discard the parameters even from a successful scan. This is documented in Google's own Key URI Format, which notes that the algorithm parameter "is ignored by the Google Authenticator implementations", that period likewise "is ignored by the Google Authenticator implementations", and that on Android the digits parameter is ignored too. An app that ignores a parameter it was handed will behave identically whether you scanned or typed.

The fix is a form with more fields, not a better scan. An authenticator whose manual entry exposes the algorithm, the digit count and the period can reproduce anything a QR code could have carried. KeyNesta's add-entry form carries all three, offers 6, 7 or 8 digits, SHA1, SHA256 or SHA512, and a period you set in seconds, and it has a Steam Guard type that pins the five-character format for you. Its validator refuses an out-of-range value outright rather than silently rounding it into a configuration that generates wrong codes, which is the behaviour that makes this bug so hard to see.

So if you hand-typed a key and the codes are rejected, do not start again on the clock. Check the service's setup page for a stated digit count, period or algorithm, and put those into the entry. Everything else about a refused code, including the clock, is covered in 2FA code not working.

When the service offers no text key at all

Some setup screens genuinely give you a QR code and nothing else. In rough order of how well they work:

Open the same page on a desktop browser. The manual-entry link is frequently present in the desktop layout and collapsed out of the mobile one. This also solves the same-device problem in one move, because the code is then on a different screen from your camera.

Look for the option under a different name. Enter a setup key, Enter code manually, Can't scan image, Set up manually, Use a different method. It is often deliberately small.

Check whether you can enrol later instead of now. Plenty of services put two-factor setup in the signup flow and also leave it available afterwards in account or security settings, and some cannot complete it during account creation at all. If the screen will come back, it is not a screen you have to beat today, and a second attempt from settings often renders a fresh code on a page that behaves better.

Ask whoever administers the service to reset or re-issue it. WP Ghost documents an administrator reset of a user's key for precisely this case. Starting enrolment again issues a brand new secret, and because you never finished the first attempt, abandoning it costs nothing.

Do not paste the QR code into a random online decoder. It would work, and it would also hand your account's permanent secret to a stranger's web server. If you are weighing that up, is it safe to screenshot your 2FA QR code walks through what that image is worth to whoever ends up with it.

Use whatever other second factor the service offers. If a QR code is genuinely the only route and none of the above applies, a different method now beats an abandoned setup.

Prove the account works before you close the tab

The service's own confirmation step is the real test, and it is not optional: if it will not accept the code you just generated, nothing downstream improves. Finish it before you close the setup page, while the key is still on screen and a retry is cheap.

If you want to check your app independently of any account, KeyNesta publishes a test your authenticator app page that shows a live code for a throwaway secret, along with the same secret in text so you can try both the scan and the typed route and compare the results. It is a quick way to tell an app problem from a service problem before you blame either.

Then keep the recovery material the service hands over at the same moment. The setup key is not a backup code, and if you never want to be on this screen under pressure again, where to store 2FA backup codes is the companion step. For the exact sequence at a specific provider, 2FA setup guides covers the common ones screen by screen.

Where KeyNesta fits, and what it cannot do

KeyNesta is an authenticator app, so it is on the typing end of this problem rather than the issuing end. What it does here: it reads an otpauth:// URI, from a scan or pasted as text, parses it on your device, shows you what it found, and saves the entry only after you confirm. Manual entry carries the algorithm, digits and period, so a non-default account survives being typed. Codes are computed locally, which is why none of this needs a connection, as do authenticator apps need internet sets out feature by feature.

What it cannot do, stated plainly because it decides whether this page helps you: KeyNesta stores TOTP secrets only. It has no passkey support and no hardware security key support. If the thing that will not scan is a passkey registration or a WebAuthn security key enrolment, KeyNesta is not the app for it, and you should finish that setup in the service or with your key directly. It also cannot conjure a secret that a service declines to show you, and it cannot accept an Okta activation link or a Microsoft Code and Url pair, because those are not TOTP secrets.

Frequently asked questions

Is typing the setup key less secure than scanning the QR code?

No. The QR code is a picture of a text string, and the setup key is the most important field inside that string, so both routes deliver the same secret to the same place. The only difference is that typing it is slower and leaves more room for a transcription slip, which is why the base32 rules above are worth a glance. Where real care is needed is not the method but the trail: a key copied through a chat message or an email to yourself leaves a copy of a permanent credential in those places.

Why does the QR code not scan when it is on the same phone as my authenticator?

Because a phone cannot aim its own rear camera at its own screen. This is not a bug or a resolution problem, and no amount of retrying will solve it. Use the copy-key link on the setup page and paste it into the app, or use the tap-to-open link if the service offers one on its mobile layout. Opening the same setup page on a computer also works, and is often faster.

My setup key has a zero in it and the app rejects it. What am I reading wrong?

The letter O. Base32 is built from A to Z and 2 to 7 only, and RFC 4648 says the digits 0 and 1 were left out precisely because they are confused with O, I and L. The same applies to 8 and 9, which are also absent. Re-read the character as a letter and try again, and if the font makes it genuinely ambiguous, copy the key to the clipboard rather than transcribing it by eye.

I typed the key correctly but every code is refused. What now?

Check the digit count, the period and the algorithm rather than the clock. A typed key carries none of those, so your app assumes six digits, thirty seconds and SHA1, and an issuer who chose otherwise will reject every code you produce. Steam Guard is the familiar case, at five characters rather than six. Look for a stated format on the service's setup page, then put those values into the entry in an app whose manual form has fields for them.

Can I put an Okta Verify activation link or a Microsoft Code and Url into any authenticator app?

No. Those are enrolment payloads for one specific app rather than base32 secrets. Okta's "Can't scan?" menu offers activation links by email or SMS alongside a separate manual option that does reveal a Secret Key, and choosing the manual route means that account generates codes without push approvals. Microsoft's work or school account path hands you a Code and a Url to enter in Microsoft Authenticator. If you want a third-party app on those accounts, look for the option that explicitly offers a key for other authenticators, which an administrator may have turned off.

Does a dark-mode page really stop a QR code scanning?

The page's theme matters only if it changes the code itself. A dark page that still draws a dark-on-light QR code inside a white tile scans normally. A page that renders the code as white modules on a dark ground has produced an inverted code, and in-app scanners generally attempt the normal polarity first, with inversion as an extra pass that has to be enabled. Switching the site to a light theme, or raising brightness and removing any screen filter, is the quickest thing to try.

Takeaway

The sentence worth keeping is that a 2FA QR code is not a scan, it is a string. Once you know it is an otpauth:// URI with a base32 secret inside, the whole problem reorganises itself: the camera is rarely at fault, the text key is not a compromise, and the only characters that can appear in that key are A to Z and 2 to 7.

The part to carry past this setup screen is the half nobody warns you about. The key is one of four things the QR code was carrying, and the other three say how to use it. Scan and they come along. Type, and your app fills them in with the common defaults and tells you nothing. When a hand-entered account produces beautiful codes that are refused without explanation, you are not looking at a wrong clock or a wrong key. You are looking at the right secret, used the wrong way.

Sources