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 https://account.shieldlabs.ai/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 (32 hex chars)
secret_keypathstringDomain secret key (32 hex chars)
search_typepathstringuser_hid, visitor_id, device_id, cookie_id, session_id, 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":             "6ba7b810-9dad-11d1-80b4-00c04fd430c9",
    "VisitorID":            "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "UserHID":              "e3b0c44298fc1c149afb...",
    "IP":                   "93.184.216.34",
    "OS":                   "Windows",
    "Browser":              "Chrome",
    "Country":              "US",
    "Score":                42,
    "Details":              [{"Value": 10, "Description": "Is datacenter"}],
    "ConnectionType":       "wifi",
    "DeviceType":           "desktop",
    "WebRtcConnectionType": "srflx",
    "WebRtcCountry":        "US",
    "WebRtcHIP":            "93.184.216.34",
    "TcpMss":               1460,
    "MtuHint":              "direct",
    "MtuValue":             1500,
    "CreatedAt":            "2026-04-14T10:00:00Z"
  }
]

Examples

Query by UserHID

curl "https://account.shieldlabs.ai/pub/a3f8c2d1.../7e4b9a2c.../debug/user_hid/e3b0c44298fc...?limit=5"

Query by DeviceID

curl "https://account.shieldlabs.ai/pub/a3f8c2d1.../7e4b9a2c.../debug/device_id/6ba7b810-9dad-11d1-80b4-00c04fd430c9?limit=10"

Query by IP

curl "https://account.shieldlabs.ai/pub/a3f8c2d1.../7e4b9a2c.../debug/ip/93.184.216.34"

Node.js example

async function getRecentSessions(userHashedId, limit = 5) {
  const url = `https://account.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 >= 60);

Error responses

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