# Guides: testing verification flows and letting agents through 2FA

> Practical, vendor-neutral guides to testing email OTP, SMS verification codes, magic-link login and TOTP 2FA in Playwright and other E2E frameworks, and to letting AI agents complete sign-up and login on your own apps.

Last updated 2026-12-03 · By the Humanless team at Ninety Nine Oranges · Canonical: https://usehumanless.com/guides

> **Short answer:** Each guide starts with a direct answer, then compares the do-it-yourself options (Mailpit, the Gmail API, your own Twilio number, otplib) with hosted ones, including Humanless, and ends with code, pitfalls and an FAQ. Every guide assumes you are testing an app you own or are authorized to test.

## Testing verification flows

- [How to test email OTP and verification codes in Playwright](/guides/playwright-email-otp): Mailpit, the Gmail API or a hosted inbox. One inbox per test, no `waitForTimeout`.
- [How to test SMS verification codes in automated tests](/guides/sms-verification-testing): stub, rent a Twilio number yourself, or use dedicated test numbers. Parallelism and cost.
- [How to test magic link login end to end](/guides/magic-link-testing): pick the right link, open it in the same browser context, and avoid PKCE and single-use-token traps.
- [How to test TOTP / authenticator 2FA in E2E tests](/guides/totp-e2e-testing): capture the secret, generate codes with otplib or pyotp, and handle the 30-second window and replay protection.

## AI agents

- [How to let an AI agent complete sign-up, login and 2FA on your own app](/guides/ai-agent-2fa): the Humanless remote MCP server for Claude Code, Cursor and Claude Desktop, and REST tools for browser-use, Stagehand and custom loops.

## Comparisons

- [Humanless vs Mailosaur vs MailSlurp vs Mailtrap](/compare/mailosaur-alternative): an honest feature and pricing comparison as of Dec 2026, with links to each vendor's own pages.

## FAQ

### Are these guides only about Humanless?

No. Each guide covers the free and do-it-yourself approaches first (Mailpit, the Gmail API, Twilio, otplib, pyotp, test-mode bypasses) and says when they're the better choice. Humanless appears as one option, with code that matches its real API.

### Can I use these techniques on any website?

Only on applications you own or are explicitly authorized to test. Using disposable inboxes or numbers to sign up for, or get past verification on, third-party services is against Humanless's [Terms](/terms), and usually against the other service's terms too.

### Is there a machine-readable version of each guide?

Yes. Every guide has a Markdown twin at the same URL with `.md` appended, for example [/guides/playwright-email-otp.md](/guides/playwright-email-otp.md).
