Skip to main content

How to install

Using Maven

Add this dependency to your project’s POM:
XML
XML

Using Gradle

Add this dependency to your project’s build file:
Groovy
Kotlin

Others

Generate the JAR file:
Bash
Then manually install sdk/build/libs/java-sdk-8.4.0.jar.

Usage

Initialize the client instance and use it to make API requests. You need to specify your secret API key and region (if it is not US/Global).
Java

Migration guide for Java SDK v8

Version 8 migrates the SDK from Server API v3 to v4. This is a breaking change.

Package rename

The artifact ID changed from fingerprint-pro-server-api-java-sdk to java-sdk. All import paths changed from com.fingerprint.* to com.fingerprint.v4.*. Gradle (build.gradle):
Groovy

Import changes

All imports change from com.fingerprint.* to com.fingerprint.v4.*:
Java

getEvent return type

getEvent now returns Event instead of EventsGetResponse. The event object has a flatter structure. Smart Signals are now top-level fields instead of nested under products:
Java

getVisits replaced by searchEvents

getVisits and getRelatedVisitors have been removed. Use searchEvents to query visitor history:
Java

Handling sealed client results from a v3 JavaScript agent

Java SDK v8 will fail to deserialize the decrypted payload of a sealed client result sent by a v3 JavaScript agent into an Event because the payload is an EventsGetResponse (the v3 event format), not an Event. To upgrade to Java SDK v8 without requiring a concurrent upgrade to the v4 JavaScript agent, you can fall back to using the Server API if unsealing the sealed client results fails. To enable this fallback path, your frontend must send the event ID alongside the sealed client results, as recommended by the sealed client results guide. Both Sealed.unsealEventResponse and api.getEvent return an Event, so the fallback returns the same type.
Java

Documentation

You can find the full documentation in the official GitHub repository.