Pattern
Puppeteer drives the browser; plainfetch (Node 18+) talks to the TempInbox API. Zero dependencies beyond Puppeteer itself. If you’re choosing a framework today, see the Playwright guide — the API integration is identical.
Helper
Reuse the zero-dependency Node client from API Client Snippets —createInbox(), waitForMail(), extractOtp().
POST /api/new_address is Turnstile-protected on the public instance. Pre-create addresses in the web UI and reuse the JWT, or self-host with Turnstile disabled. See API Overview.Example: OTP signup (Jest + Puppeteer)
signup.test.mjs
Magic link
Tips
- Poll the API, never scrape the TempInbox UI with Puppeteer — faster and flake-free
- One inbox per test — parallel Jest workers never collide
- 2–3s poll interval, 60s timeout in CI — list responses cached up to 60s at
offset=0