Add deliverability and risk decisions to your product with explicit final and temporary states. Retry guidance helps your integration avoid treating greylisting as a permanent failure.
// Specify the base url and parameters
const baseUrl = 'https://api.ValidEmail.net/';
const params = new URLSearchParams({
email: 'Email_Address', // Replace with the email you want to verify
token: 'YOUR_API_KEY' // Replace with your actual API key
});
// Make the GET request
fetch(`${baseUrl}?${params}`)
.then(response => response.json())
.then(data => {
console.log(`Email is valid: ${data.IsValid}`);
console.log(`Score: ${data.Score}`);
console.log(`Email State: ${data.State}`);
console.log(`Reason: ${data.Reason}`);
const additionalInfo = data.EmailAdditionalInfo;
for (const info of additionalInfo) {
console.log(`${info.Key}: ${info.Value}`);
}
})
.catch(error => {
console.error('Error:', error);
});
import requests
base_url = 'https://api.ValidEmail.net/'
params = {
'email': 'Email_Address', # replace with the email you want to verify
'token': 'YOUR_API_KEY' # replace with your actual API key
}
response = requests.get(base_url, params=params)
if response.status_code == 200:
data = response.json()
is_valid = data['IsValid']
score = data['Score']
email_state = data['State']
reason = data['Reason']
print(f"Email is valid: {is_valid}")
print(f"Score: {score}")
print(f"Email State: {email_state}")
print(f"Reason: {reason}")
additional_info = data['EmailAdditionalInfo']
for info in additional_info:
print(f"{info['Key']}: {info['Value']}")
else:
print(f"Request failed with status {response.status_code}")
using System;
using System.Net.Http;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Collections.Generic;
class Program
{
static readonly HttpClient client = new HttpClient();
static async Task Main()
{
var email = "Email_Address"; // Replace with the email you want to verify
var token = "YOUR_API_KEY"; // Replace with your actual API key
var url = $"https://api.ValidEmail.net/?email={email}&token={token}";
HttpResponseMessage response = await client.GetAsync(url);
if (response.IsSuccessStatusCode)
{
var responseBody = await response.Content.ReadAsStringAsync();
var result = JsonConvert.DeserializeObject<Response>(responseBody);
Console.WriteLine($"Email is valid: {result.IsValid}");
Console.WriteLine($"Score: {result.Score}");
Console.WriteLine($"Email state: {result.State}");
Console.WriteLine($"Reason: {result.Reason}");
foreach (var info in result.EmailAdditionalInfo)
{
Console.WriteLine($"{info.Key}: {info.Value}");
}
}
else
{
Console.WriteLine($"Request failed with status code {response.StatusCode}");
}
}
}
public class Response
{
public bool IsValid { get; set; }
public int Score { get; set; }
public string Email { get; set; }
public string State { get; set; }
public string Reason { get; set; }
public string Domain { get; set; }
public bool Free { get; set; }
public bool Role { get; set; }
public bool Disposable { get; set; }
public bool AcceptAll { get; set; }
public bool Tag { get; set; }
public string MXRecord { get; set; }
public List<Info> EmailAdditionalInfo { get; set; }
}
public class Info
{
public string Key { get; set; }
public string Value { get; set; }
}
<?php
$email = 'Email_Address'; // Replace with the email you want to verify
$token = 'YOUR_API_KEY'; // Replace with your actual API key
$url = "https://api.ValidEmail.net/?email=$email&token=$token";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close($ch);
$data = json_decode($result, true);
echo "Email is valid: " . ($data["IsValid"] ? 'Yes' : 'No') . "\n";
echo "Score: " . $data["Score"] . "\n";
echo "Email state: " . $data["State"] . "\n";
echo "Reason: " . $data["Reason"] . "\n";
foreach ($data["EmailAdditionalInfo"] as $info) {
echo $info["Key"] . ": " . $info["Value"] . "\n";
}
?>