DocumentationEmail Validation Api

Email Validation Api


Below you will find guidelines on the most efficient method for using our API. The API requires that you have a working credit balance and will never take credit for any ambiguous results.

The response time for our API is between one second and 5 seconds. Our API automatically detects if an email address is valid or not and helps you to eliminate all disposable, fake and mistyped email addresses.

Calling The API

  • PHP
  • JAVA
  • PYTHON
  • C#
  • VB.NET

<?php
//api key and email to be validated
$apiKey = 'Your Secret Key';
$emailToValidate = 'example@example.com';

// use curl to make the request
$url = 'https://yobounce.com/api/verify.php?apikey='.$apiKey.'&email='.urlencode($emailToValidate);

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true );    
$response = curl_exec($ch);
curl_close($ch);
?>

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
 
public class MyClass {
 
    public static void main(String[] args){
 
        String key = "Your Secret Key";
        String email = "example@example.com";
        String targetURL = "https://yobounce.com/api/verify.php?apikey="+key+"&email="+email;
 
        HttpURLConnection connection = null;
        final String USER_AGENT = "Mozilla/5.0";
 
        try {
            URL url = new URL(targetURL);
            connection = (HttpURLConnection) url.openConnection();
            connection.setRequestMethod("GET");
            connection.addRequestProperty("User-Agent", USER_AGENT);
            connection.setUseCaches(false);
            connection.setDoOutput(true);
 
            BufferedReader in = new BufferedReader(
                    new InputStreamReader(connection.getInputStream()));
            String inputLine;
            StringBuffer response = new StringBuffer();
 
            while ((inputLine = in.readLine()) != null) {
                response.append(inputLine);
            }
            in.close();
 
            //print result
            System.out.println(response.toString());
 
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (connection != null) {
                connection.disconnect();
            }
        }
 
    }
}

url = "https://yobounce.com/api/verify.php"
apikey = "Your Secret Key"
email = "example@example.com"
 
params = {"email": email, "apikey": apikey}
 
response = requests.get(url, params=params)
 
# Print the returned json
print json.loads(response.content)

try {
string apiKey = "Your Secret Key";
string emailToValidate = "example@example.com";
string responseString = "";
    string apiURL = "https://yobounce.com/api/verify.php?apikey=" + apiKey + "&email=" +  HttpUtility.UrlEncode(emailToValidate);
 
 
    HttpWebRequest request = (HttpWebRequest)WebRequest.Create(apiURL);
    request.Timeout = 150000;
    request.Method = "GET";
 
    using (WebResponse response = request.GetResponse()) {
        response.GetResponseStream().ReadTimeout = 20000;
        using (StreamReader ostream = new StreamReader(response.GetResponseStream())) {
            responseString = ostream.ReadToEnd();
        }
    }
    } catch (exception ex) {
//Catch Exception - errors
}

Try
    Dim apiKey as string = "Your Secret Key"
    Dim emailToValidate as string = "example@example.com"
    Dim responseString as string = ""
    Dim apiURL as string = "https://yobounce.com/api/verify.php?apikey=" & apiKey & "&email=" &  HttpUtility.UrlEncode(emailToValidate)
   
    Dim request As HttpWebRequest = DirectCast(WebRequest.Create(apiURL), HttpWebRequest)
    request.Timeout = 150000
    request.Method = "GET"
 
    Using response As WebResponse = request.GetResponse()
        response.GetResponseStream().ReadTimeout = 20000
        Using ostream As New StreamReader(response.GetResponseStream())
            responseString = ostream.ReadToEnd()
        End Using
    End Using
Catch ex as exception
'Catch Exception - errors
End Try

API will return these results in a JSON format using the "verify" method

status - [Valid | Invalid]

Successful response sample from the API using the "validate" method

  • JSON

{
"status":"Valid"
"status":"Invalid"
}

Failure response sample using the API with either method


{
"error":"Invalid API Key"
"error":"Your account ran out of credits"
}