Skip to main content
Read and evaluate a stored identification, then verify raw-body webhook signatures in your backend. This guide uses the supported ShieldLabs package API, not a standalone generated client.

Before you start

Java 11+, Maven or Gradle, and a Private API Key. The SDK uses Jackson for JSON. Register and verify the website domain in your analytics dashboard. Use credentials from the same domain and environment as the browser check. For a fresh account, start with Quick Start.

Get your credentials

Copy the domain’s Private API Key from Integration > API keys and store it as SHIELDLABS_API_KEY in your server environment. For webhook verification, also set SHIELDLABS_WEBHOOK_SECRET from Integration > Webhooks. Never expose either secret to the browser.

Install the SDK

Version 1.0.0 is shown as an installable baseline; use the latest published stable version when upgrading.

Add the integration

Save this as QuickStart.java in a project that depends on shieldlabs-java:
Run it with SHIELDLABS_API_KEY set and a request ID as the argument. A runnable backend with both halves (a signup guard and a webhook receiver) lives in examples/httpserver.

Test the complete flow

  1. Use the Request ID from a real browser check on the same domain as the Private API Key.
  2. Confirm the server retrieves that identification and its Risk Score.
  3. Test an invalid or missing ID and an unavailable API: none should be treated as a clean identification.
  4. For webhooks, test the original raw body with its signature, then change one byte and confirm rejection.
In-memory replay stores in examples are demonstrations, not shared production storage. Claim accepted IDs atomically in a durable database or cache, enforce freshness, authenticate the action, and check the expected domain and user association. Reading a valid identification alone does not authorize a business action.

Troubleshooting

  • No History row: confirm the registered domain, credential/environment match and that the browser remained open while collectors posted.
  • Missing or pending verdict: scoring is asynchronous. The server helper waits within a bounded budget; handle a missing result and API errors explicitly.
  • Authentication error: use the Private API Key for History, not a Public Key, Management Secret Key or MCP OAuth token.
  • Invalid webhook signature: verify the original raw bytes with the endpoint’s full signing secret, before trusting parsed JSON.

Next steps