Wystawić token sandbox
# Mint a sandbox token (requires argus:platform:admin)
curl -X POST https://auth.knogin.com/v1/platform/apps/app_123/sandbox-token \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"scenarios": ["wallet.high-risk", "entity.sanctioned"],
"ttl_seconds": 3600
}'
# 200 OK
# {
# "token": "<sandbox-jwt>",
# "expires_at": "2026-05-08T13:00:00Z",
# "audience": "sandbox",
# "scopes": [
# "argus:profiles:read",
# "argus:profiles:write",
# "argus:jobs:read",
# "argus:jobs:write"
# ],
# "sandbox_host": "https://sandbox-api.knogin.com",
# "scenarios": ["wallet.high-risk", "entity.sanctioned"]
# }
Wylistować scenarios sandbox
# Discover the scenario catalogue (sandbox host only)
curl https://sandbox-api.knogin.com/v1/sandbox/scenarios \
-H "Authorization: Bearer $SANDBOX_TOKEN"
# 200 OK
# {
# "scenarios": [
# { "id": "wallet.high-risk", "label": "High-risk wallet", "description": "..." },
# { "id": "wallet.clean", "label": "Clean wallet", "description": "..." },
# { "id": "entity.sanctioned", "label": "Sanctioned entity", "description": "..." },
# { "id": "incident.escalating", "label": "Escalating incident", "description": "..." },
# { "id": "device.offline", "label": "Offline medical device", "description": "..." }
# ]
# }
# A live token against the sandbox host fails closed:
# HTTP/1.1 403 Forbidden
# X-Argus-Sandbox-Reason: live-token-on-sandbox-host
Wywołać powierzchnię sandbox
# Same v2026.4 surface, sandbox host, sandbox token.
# Two replays of the same payload return a byte-equal response.
curl -X POST https://sandbox-api.knogin.com/v1/jobs \
-H "Authorization: Bearer $SANDBOX_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "intelligence.enrich.bulk",
"payload": { "profile_ids": ["p1", "p2"] }
}'
# Response carries:
# X-Argus-Sandbox: true
# X-Argus-Trace-ID: <32-hex> (G2 trace propagation, unchanged)
# When ready for production, swap the base URL and re-mint a live token:
curl -X POST https://auth.knogin.com/v1/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=app_123&client_secret=<secret>&scope=argus:jobs:write"
curl -X POST https://api.knogin.com/v1/jobs \
-H "Authorization: Bearer $LIVE_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "kind": "intelligence.enrich.bulk", "payload": { "profile_ids": ["p1"] } }'