All Collections
Reader Help
I tried to buy a book and was taken to a screen that said you would send me a "verification code" by email. Why is this happening, and what should I do next?
I tried to buy a book and was taken to a screen that said you would send me a "verification code" by email. Why is this happening, and what should I do next?
Leanpub Support avatar
Written by Leanpub Support
Updated over a week ago

First, please note that if you encounter our verification code login system, your purchase has not been completed, and you have not been charged.

This article explains our verification code system in detail, but if you just want to sign in to Leanpub and complete a purchase, please see this short article instead!

Our verification code system is designed to protect Leanpub users from fraud and hacks, and was initiated in your case because one of the following three things happened:

  1. The email address you used to try to make the purchase has been used previously to make a Leanpub purchase, and you need to log in to complete your purchase.

  2. The security system which separates human users from bot attackers could not figure out if you were human or a bot. (We use reCAPTCHA v3, by Google. If you have JavaScript disabled or certain ad blockers enabled, this can cause reCAPTCHA to get confused.) 

  3. You encountered a rare bug (if you haven't ever bought anything from Leanpub, and you haven't entered your email address as part of the purchase process yet, unfortunately this applies to you - please scroll down for a solution)

If the problem is 1. or 2. above, the solution is pretty simple. If you check your email, you should see an email from Leanpub containing a short string of characters. If you copy this verification code, then you can paste it into the screen in your browser where you are being told about the token. Then, you can log in to Leanpub and complete your purchase.

Alternatively, you can ignore the verification code and sign in to Leanpub. You can do that here:

Here's how this works: we automatically create an account for you when you first purchase a Leanpub book, and we create a library for you at This is done so that you can always access the download links for latest version of all the books you buy, all from one place.

If you've never set a password for your account, you can do that here:

Once you have logged in, you can make a purchase as you normally would.

(By the way, if you're wondering why we require you to sign in to your account, the reason is simple: We don't want to give someone who is not you access to your account.  So, if you're not signed in, and are using an account email address to purchase, and that email address already belongs to a Leanpub account, we ensure you sign in to that account. This way, someone else can't just get access to your account by buying you a book :)

Finally, if you read the above stuff about reCAPTCHA and thought "but I didn't solve any captchas, either the fuzzy text kind or the click fire hydrants and storefronts kind": the fuzzy text type of captcha is the original kind. The identify pictures kind is reCAPTCHA v2. The type of captcha used in reCAPTCHA v3 is done with no need to click on pictures or decode text. Instead, Google just makes a guess, based on various factors. Google is pretty smart.

If the problem is 3. above, please create a Leanpub account here:

After you create an account, you should be able to complete your purchase, without encountering any bugs or our verification code system.

Did this answer your question?