Use Case
Automated OTP & MFA Extraction
Don't let two-factor authentication block your AI agents. AgentMailr instantly parses verification emails and delivers clean OTPs via API.
Regex-Powered Parsing
We automatically scan incoming emails for standard OTP formats (4 digits, 6 digits, alphanumeric codes, magic links) and return the structured string to your agent. No more feeding entire HTML blobs into LLM context windows just to find a code.
Zero-Loop Polling
Trigger an action that sends an email, then hit our `/wait` endpoint. The HTTP request hangs open until the email arrives, returning the data instantly. It's wildly efficient for agentic orchestration.
auth_flow.ts
// Agent hits a 2FA wall...
const code = await aiInbox.waitForOtp(
timeout: 60000,
sender: "auth@github.com"
});
// AgentMailr handles the extraction automatically
await page.type("#otp", code.value);
await page.click("#submit");