Java Quick Start


Get an API Key and Secret


If you haven’t already, sign up for a free trial.

Include the Enzoic Library


The Java package is available either via package manager or direct download.

Maven

The enzoic-java-client is available in Maven Central. Just include the following in your pom.xml dependencies section.

<dependencies>
    <dependency>
      <groupId>com.enzoic</groupId>
      <artifactId>enzoic-java-client</artifactId>
      <version>3.0.1</version>
    </dependency>
</dependencies>

Gradle

Include the following in your build.gradle dependencies section.

dependencies {
  compile 'com.enzoic:enzoic-java-client:3.0.1'
}

Download

You can download a version of the .jar directly from
https://oss.sonatype.org/content/groups/public/com/enzoic/enzoic-java-client/

Try Out Our Example Code


We’ve made calling the API dead simple. This sample code snippet shows you examples of calling the four supported APIs:

// Create a new Enzoic instance - this is our primary interface for making API calls
Enzoic enzoic = new Enzoic(YOUR_API_KEY, YOUR_API_SECRET);
 
// Check whether a password has been compromised
if (enzoic.CheckPassword("password-to-test")) {
    System.out.println("Password is compromised");
}
else {
    System.out.println("Password is not compromised");
}
 
// Check whether a specific set of credentials are compromised
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test")) {
    System.out.println("Credentials are compromised");
}
else {
    System.out.println("Credentials are not compromised");
}
 
// get all exposures for a given user
ExposuresResponse exposures = enzoic.GetExposuresForUser("test@enzoic.com");
System.out.println(exposures.getCount() + " exposures found for test@enzoic.com");
 
// now get the full details for the first exposure found
ExposureDetails details = enzoic.GetExposureDetails(exposures.getExposures()[0]);
System.out.println("First exposure for test@enzoic.com was " + details.getTitle());

Learn More


That should get you started. Check out the Github project page for more details.