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

Flask Route Guard Email Verification Guide

Add real-time email verification and disposable-email blocking to Flask Route Guard with the VeriShield Edge API. The snippet below gates a signup and returns the canonical email identity.

Language
Python 3.12
Ecosystem
WSGI / Jinja
Latency
< 85ms

Install

Shell
pip install flask requests

Verification code

Python 3.12
import os, requests
from functools import wraps
from flask import request, jsonify

def verishield_required(f):
    @wraps(f)
    def wrapper(*args, **kwargs):
        email = (request.json or {}).get('email', '')
        resp = requests.post('https://verishield-edge-api.p.rapidapi.com/v1/verify',
            headers={'X-RapidAPI-Key': os.getenv('RAPIDAPI_KEY', '')},
            json={'email': email}, timeout=3)
        if resp.json()['fraud_risk']['recommendation'] == 'BLOCK':
            return jsonify(error='Blocked disposable email'), 403
        return f(*args, **kwargs)
    return wrapper

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