ASP.NET Core 8 Service Email Verification Guide
Add real-time email verification and disposable-email blocking to ASP.NET Core 8 Service with the VeriShield Edge API. The snippet below gates a signup and returns the canonical email identity.
Language
C# 12
Ecosystem
.NET / HttpClient
Latency
< 85ms
Install
Shell
dotnet add package Microsoft.Extensions.HttpVerification code
C# 12
public class VeriShieldClient {
private readonly HttpClient _http;
public VeriShieldClient(HttpClient http) => _http = http;
public async Task<bool> IsAllowedAsync(string email) {
var req = new HttpRequestMessage(HttpMethod.Post, "https://verishield-edge-api.p.rapidapi.com/v1/verify");
req.Headers.Add("X-RapidAPI-Key", Environment.GetEnvironmentVariable("RAPIDAPI_KEY"));
req.Content = JsonContent.Create(new { email });
var resp = await _http.SendAsync(req);
var report = await resp.Content.ReadFromJsonAsync<JsonElement>();
return report.GetProperty("fraud_risk").GetProperty("recommendation").GetString() != "BLOCK";
}
}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.