sumsub/agent-skills / skills/sumsub-integrate-dint-standalone
sumsub-integrate-dint-standalone
VerifiedAdd Sumsub Device Intelligence (the Fisherman JS module) to your own web pages where there is NO Sumsub verification widget — login, signup, password reset, 2FA, checkout, or any high-value action you want fraud-screened. TRIGGER when the user asks to "add device intelligence to login / signup", "fingerprint the device on a custom page", "use Fisherman standalone / self-hosted", "ongoing monitoring of platform events", "pre-KYC device check", "detect multi-accounting at signup", or "send a financial transaction with the captured device". Covers the whole loop — behavior access token, @sumsub/fisherman init + fingerprint, confirming the event (platform event / financial transaction / create-applicant), reading results, sandbox, go-live. SKIP when the page already embeds the Sumsub WebSDK — Device Intelligence rides along inside it, use `sumsub-integrate-dint-websdk`.
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 4.8 KB |
| SKILL.md | skill md | 16.6 KB |
| examples/behavior-token.sh | script | 2.1 KB |
| examples/fisherman-react.tsx | other | 2.6 KB |
| examples/fisherman-vanilla.html | other | 2.4 KB |
| examples/submit-platform-event.sh | script | 3.7 KB |
| references/standalone-flow.md | markdown | 3.9 KB |
| scripts/preflight.shexecutable | script | 7.0 KB |
examples/behavior-token.sh
View on GitHub#!/usr/bin/env bash
# Mint a Device Intelligence "behavior" access token for the standalone flow.
# This is the token your page passes to @sumsub/fisherman init().
#
# Differs from the WebSDK access-token recipe in two ways:
# 1. endpoint is /resources/accessTokens/behavior
# 2. there IS a JSON body, so the body MUST be included in the signature
# (sign: ts + "POST" + path + body)
#
# Auth: App Token + HMAC. Sandbox token only (sbx: prefix).
set -euo pipefail
: "${SUMSUB_APP_TOKEN:?set SUMSUB_APP_TOKEN (sbx:...)}"
: "${SUMSUB_SECRET_KEY:?set SUMSUB_SECRET_KEY}"
SESSION_ID="${1:?usage: behavior-token.sh <sessionId> [ttlInSecs]}"
TTL="${2:-1800}"
case "$SUMSUB_APP_TOKEN" in
sbx:*) ;;
*) echo "refusing non-sandbox token; use an sbx: App Token for integration work" >&2; exit 1 ;;
esac
PATH_Q="/resources/accessTokens/behavior"
# Escape " and \ so a session id containing them can't break out of / inject into the
# JSON body (which gets signed and sent as-is). Pure bash, no extra deps; an exotic
# control char would still yield a harmless 400, never injection.
esc() { local s=$1; s=${s//\\/\\\\}; s=${s//\"/\\\"}; printf '%s' "$s"; }
# ttlInSecs is a bare JSON number — validate it rather than string-escaping, else a
# value like '1800}...' would inject structure.
[[ "$TTL" =~ ^[0-9]+$ ]] || { echo "ttlInSecs must be a positive integer" >&2; exit 1; }
BODY=$(printf '{"sessionId":"%s","ttlInSecs":%s}' "$(esc "$SESSION_ID")" "$TTL")
TS=$(date -u +%s)
# IMPORTANT: body is part of the signed string for POSTs with a body.
SIG=$(printf '%s%s%s%s' "$TS" "POST" "$PATH_Q" "$BODY" \
| openssl dgst -sha256 -hmac "$SUMSUB_SECRET_KEY" -hex \
| awk '{print $NF}')
curl --compressed -sS --fail-with-body -X POST \
-H "Content-Type: application/json" \
-H "X-App-Token: $SUMSUB_APP_TOKEN" \
-H "X-App-Access-Ts: $TS" \
-H "X-App-Access-Sig: $SIG" \
-H "X-Agent-Source: sumsub-skills" \
-H "X-Agent-Source-Ver: 1.6.1" \
--data "$BODY" \
"https://api.sumsub.com${PATH_Q}"
# Response: { "token": "_act-jwt-..." } (behavior tokens carry no userId) -> return .token to the browser.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |