Skip to main content

Debug Snapshots

Retrieve the most recent session snapshots for any identifier. Useful for real-time server-side checks and debugging.

Endpoint

GET /pub/{public_key}/{secret_key}/debug/{search_type}/{value}
No JWT required — authenticates via public_key and secret_key in the URL.

Parameters

ParameterInTypeRequiredDescription
public_keypathstringDomain public key
secret_keypathstringDomain secret key
search_typepathstringuser_hid, visitor_id, device_id, webrtc_ip, ip, request_id
valuepathstringThe identifier to search for
limitqueryintegerNumber of results (1–20, default 5)

Response

Array of debug snapshots in capitalized-key format:
[
  {
    "RequestID":            "550e8400-e29b-41d4-a716-446655440000",
    "DeviceID":             "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4",
    "VisitorID":            "7f3e9a12-4b5c-4d6e-8f9a-0b1c2d3e4f5a",
    "UserHID":              "e3b0c44298fc1c149afb...",
    "IP":                   "93.184.216.34",
    "OS":                   "Windows",
    "Browser":              "Chrome",
    "Country":              "US",
    "Score":                42,
    "Details":              [{"Value": 20, "Description": "Is datacenter"}],
    "ConnectionType":       "wifi",
    "DeviceType":           "desktop",
    "WebRtcConnectionType": "srflx",
    "WebRtcCountry":        "US",
    "WebRtcHIP":            "93.184.216.34",
    "TcpMss":               1460,
    "MtuHint":              "ethernet",
    "MtuValue":             1500,
    "CreatedAt":            "2026-04-14T10:00:00Z"
  }
]

Examples

Query by UserHID

curl "https://api.shieldlabs.ai/pub/d932476e-.../89jb7aadz.../debug/user_hid/e3b0c44298fc...?limit=5"

Query by DeviceID

curl "https://api.shieldlabs.ai/pub/d932476e-.../89jb7aadz.../debug/device_id/a1b2c3d4...?limit=10"

Query by IP

curl "https://api.shieldlabs.ai/pub/d932476e-.../89jb7aadz.../debug/ip/93.184.216.34"

Node.js example

async function getRecentSessions(userHashedId, limit = 5) {
  const url = `https://api.shieldlabs.ai/pub/${PUBLIC_KEY}/${SECRET_KEY}/debug/user_hid/${userHashedId}?limit=${limit}`;
  const res = await fetch(url);
  if (!res.ok) throw new Error(`Shield API error: ${res.status}`);
  return res.json(); // Array of snapshots
}

// Usage: check if a user has any recent high-risk sessions
const sessions = await getRecentSessions(userHashedId, 10);
const hasHighRisk = sessions.some(s => s.Score >= 70);

Error responses

StatusBodyMeaning
401{"error": "unauthorized"}Invalid public_key or secret_key
404{"error": "not found"}No sessions found for this identifier