V
VeriShield EDGE
Get API Key →
Verified by VeriShield SecOps • Updated 2026-11-13

Next.js 15 (App Router & Server Actions) Email Verification Guide

Add real-time email verification and disposable-email blocking to Next.js 15 (App Router & Server Actions) with the VeriShield Edge API. The snippet below gates a signup and returns the canonical email identity.

Language
TypeScript
Ecosystem
Node.js / Vercel Edge
Latency
< 85ms

Install

Shell
npm install zod

Verification code

TypeScript
export async function verifySignupAction(email: string, userIp?: string) {
  const res = await fetch('https://verishield-edge-api.p.rapidapi.com/v1/verify', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'X-RapidAPI-Key': process.env.RAPIDAPI_KEY!,
      'X-RapidAPI-Host': 'verishield-edge-api.p.rapidapi.com'
    },
    body: JSON.stringify({ email, ip: userIp }),
    cache: 'no-store'
  });
  const report = await res.json();
  if (report.fraud_risk.recommendation === 'BLOCK') {
    return { ok: false, error: 'Please use a valid permanent email.' };
  }
  return { ok: true, canonicalEmail: report.canonical_email };
}

What this protects against

Disposable and temporary inboxes, Gmail dot-trick and plus-alias multi-accounting, high-entropy bot usernames, and freshly registered fraud domains. The API returns a 0-100 fraud score with an ALLOW, CHALLENGE_2FA or BLOCK recommendation.

Related Domain Reports