Guide · Python OTP Automation
Python disposable email API for verification codes
Create a throwaway inbox, trigger a signup email, and pull the extracted 6-digit OTP or confirmation link in ten lines of Python — no API key, no IMAP server, no regex parsing.
Dev-Mail's /v1/inboxes/{address}/code?wait=60 endpoint holds the HTTP request open until the message lands, strips HTML/noise, scores candidates across English/Chinese/European templates (including split-cell HTML tables), and returns {"found": true, "code": "...", "link": "..."}.
1. Quickstart with Python requests (free, no key)
import time
import requests
BASE = "https://dev-mail.com"
# 1. Create an anonymous inbox (no signup, no API key)
inbox = requests.post(f"{BASE}/v1/inboxes", timeout=15).json()
address = inbox["address"]
token = inbox["token"]
since = int(time.time())
print("Using inbox:", address)
# 2. Trigger your signup / login flow with `address` here...
# 3. Long-poll up to 60s — returns extracted OTP and verification link
res = requests.get(
f"{BASE}/v1/inboxes/{address}/code",
params={"wait": 60, "since": since},
headers={"Authorization": f"Bearer {token}"},
timeout=60 + 10,
).json()
if not res.get("found"):
raise RuntimeError("No verification email arrived in time")
print("OTP code:", res.get("code"))
print("Magic link:", res.get("link"))
2. Scaling to concurrent Python workers (1-Step Wildcard Catch-All)
Free callers get 2 full unlocked messages/day per IP on the standard pool and 20 new inboxes/hour. For parallel pytest suites, Playwright Python, or high-volume account flows, attach an X-License-Key and skip POST /v1/inboxes entirely:
import asyncio, secrets, time, httpx
BASE = "https://dev-mail.com"
KEY = "DMP-XXXXX-XXXXX-XXXXX-XXXXX" # API Catch-All Pro or Annual key
async def verify_one(client: httpx.AsyncClient, domain: str = "winmail.cfd"):
addr = f"job-{secrets.token_hex(4)}@{domain}"
since = int(time.time())
# Trigger signup with `addr` directly — no pre-creation needed!
r = await client.get(
f"{BASE}/v1/inboxes/{addr}/code",
params={"wait": 60, "since": since},
headers={"X-License-Key": KEY},
timeout=60 + 10,
)
return addr, r.json()
- Clean high-deliverability domains: includes reserved Pro domains (winmail.cfd and peers) that stay accepted by strict signup forms.
- 600 req/min & 500 inboxes/hr per license key, independent of proxy IP rotation.
- Zero monthly downtime: open a zero-signup Disposable Prepaid Account at
/pro#topup, top up once (up to +25% bonus), and enable 20% off auto-renew (API Catch-All drops from 9 to 7.2 USDT/mo).
Need unlimited Python OTP unlocks & Wildcard Catch-All?
Start free with 2 unlocks/day, or top up a zero-signup Disposable Prepaid Account (up to +25% bonus + 20% off auto-renew) with USDT/USDC on BSC, Polygon, Arbitrum, or Base — activates in ~8 seconds.
Open Prepaid Account (20% Off + Bonus) → Single-Term Plans (from 1 USDT)
Wildcard Catch-All guide → · AI Agent MCP guide → · Full API reference →