Class IDAnalyzerClient

java.lang.Object
com.idanalyzer.IDAnalyzerClient

public class IDAnalyzerClient extends Object
Client for the ID Analyzer API v2.

Targets the api2.idanalyzer.com endpoint (US, default) or api2-eu.idanalyzer.com (EU). Use the public service fields (scanner, biometric, aml, contract, transaction, docupass, profile, webhook, account).

  • Field Details

    • scanner

      public final Scanner scanner
      Document scanning & ID verification service.
    • biometric

      public final Biometric biometric
      Biometric face & liveness verification service.
    • aml

      public final AML aml
      AML / PEP / sanctions screening service.
    • contract

      public final Contract contract
      Contract generation & template management service.
    • transaction

      public final Transaction transaction
      Transaction history, decisions, vault assets and export service.
    • docupass

      public final Docupass docupass
      DocuPass remote verification & e-signature link management service.
    • profile

      public final ProfileApi profile
      Server-side KYC profile management service.
    • webhook

      public final Webhook webhook
      Webhook delivery log management service.
    • account

      public final Account account
      Account information service.
  • Constructor Details

    • IDAnalyzerClient

      public IDAnalyzerClient(String apiKey)
      Creates a client; region is read from IDANALYZER_REGION (default "us").
      Parameters:
      apiKey - API key; falls back to the IDANALYZER_KEY environment variable.
      Throws:
      InvalidArgumentException - if no API key is supplied or resolvable from the environment.
    • IDAnalyzerClient

      public IDAnalyzerClient(String apiKey, String region)
      Creates a client for an explicit region.
      Parameters:
      apiKey - API key; falls back to the IDANALYZER_KEY environment variable.
      region - "us" or "eu"; if null, falls back to IDANALYZER_REGION (default "us").
      Throws:
      InvalidArgumentException - if no API key is supplied or resolvable, or the region is not "us"/"eu".
  • Method Details

    • setBaseUrl

      public IDAnalyzerClient setBaseUrl(String baseUrl)
      Override the API base URL entirely (e.g. for an on-premise ID Fort host).
      Parameters:
      baseUrl - the base URL to use for all requests; a trailing slash is stripped.
      Returns:
      this client, for chaining.
    • parseInput

      public static String parseInput(String input, boolean allowCache)
      Accepts a file path, base64 string, URL, or (when allowCache) a "ref:" cache reference, and returns the value to send to the API.
      Parameters:
      input - a local file path, a base64-encoded image, an http(s) URL, or a "ref:" cache reference.
      allowCache - whether a "ref:" cache reference is accepted and passed through unchanged.
      Returns:
      the value to send to the API: the URL/reference as-is, or the base64 encoding of a local file.
      Throws:
      InvalidArgumentException - if a local file cannot be read, or the input is neither a readable file, a URL, a cache reference, nor a long-enough base64 string.