Nuxt 3 Server Route Email Verification Guide
Add real-time email verification and disposable-email blocking to Nuxt 3 Server Route with the VeriShield Edge API. The snippet below gates a signup and returns the canonical email identity.
Language
TypeScript
Ecosystem
Nitro / Vue
Latency
< 85ms
Install
Shell
npx nuxi initVerification code
TypeScript
export default defineEventHandler(async (event) => {
const { email } = await readBody(event);
const report = await $fetch('https://verishield-edge-api.p.rapidapi.com/v1/verify', {
method: 'POST',
headers: { 'X-RapidAPI-Key': process.env.RAPIDAPI_KEY },
body: { email }
});
if (report.fraud_risk.recommendation === 'BLOCK') {
throw createError({ statusCode: 403, statusMessage: 'Blocked disposable email' });
}
return { 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.