Skip to content

Test verification flows at scale

Signup Verification

Validate your signup and verification flows at scale. Receive OTPs, magic links, and confirmation emails programmatically with Mailhook disposable inbox API.

Key Features

  • Capture OTP codes
  • Extract magic links
  • Test edge cases
  • Monitor deliverability

Example

// JavaScript example
async function testSignupFlow() {
  // Create temp inbox
  const inbox = await mailhook.createRandomAddress();

  // Submit signup form
  await page.fill('#email', inbox.address);
  await page.click('#submit');

  // Wait for and retrieve OTP
  const emails = await mailhook.pollInbox(inbox.id, {
    timeout: 30000
  });

  // Extract OTP from email
  const otp = emails[0].textBody.match(/\d{6}/)[0];

  // Complete verification
  await page.fill('#otp', otp);
  await page.click('#verify');

  // Assert success
  expect(await page.url()).toContain('/dashboard');
}

Ready to get started?

Create your first inbox in under 60 seconds.