You can find the ZeroBounce Java API on our GitHub - Java API.

This is a java wrapper class example for the ZeroBounce API.

The project has 2 dependencies:

  1. Apache HttpClient

  2. JSON (org.json)

Either download the dependencies separately and add them to the relevant path or add the following dependencies to your pom.xml file if you're building via Maven (already added if you're cloning this repo):

Class, Properties, and Methods:

//Depending on how you use the API, you might want it to time out faster,//for example on a registration screen. //Normally the API will return results very fast, but a small percentage of//mail servers take upwards of 20+ seconds to respond. //If the API times out, it will return a status of "Unknown" and //a sub_status of "timeout_exceeded" ZeroBounceApizeroBounceApi =newZeroBounceApi("YOUR_API_KEY",TIMEOUT_IN_SECONDS);// Get credits and assign to int variableintcredits =zeroBounceApi.getCredits();// validate email and assign result to a ZeroBounceResponse objectZeroBounceResponsevalidation =zeroBounceApi.validate("");validation.getEmailAddress();validation.getStatus();validation.isDisposable();// validate email with ip and assign result to a ZeroBounceResponseWithIp objectZeroBounceResponseWithIpvalidationWithIp =zeroBounceApi.validateWithIpAddress("","some.ip.address");validationWithIp.getEmailAddress();validationWithIp.getCountry();