Authentication
API keys and domain whitelisting.
API key
One publishable emb_ key/organization; 68 characters. Admin-dashboard viewing/rotation. Cached lookups retain rotated keys for up to 5 minutes; coordinate replacement and treat leaks as active throughout.
/sol/scanner/{ADDRESS}/map?embed=1&key=emb_a1b2c3d4e5f6...
/rh/scanner/{ADDRESS}/map?embed=1&key=emb_a1b2c3d4e5f6...Keys appear in page HTML. Domains restrict framing and filter API requests best-effort; quotas bound spend.
Domain whitelisting
Shared key/domains across chains. Default public mode: no configured domains; unrestricted framing/API origins. Request domain restrictions.
With allowed domains:
- Iframe
Content-Security-Policy: frame-ancestorsblocks other sites. - Iframe API calls trust Scanner's frontend origin while independently checking key/quota.
- Direct API origins must match; rejected origins return
403 EMBED_DOMAIN_REJECTED. - Requests with neither
OriginnorReferer, including server clients, return the same error. Browsers supplyOriginon iframe API calls.
Server-to-server calls
Use server-side sk_live_ API keys. Embed header checks are spoofable filters; quotas/rate limits still apply.
| Registered | Accepted | Rejected |
|---|---|---|
app.example.com | app.example.com | example.com, other.com |
example.com | Apex and all subdomains | other.com |
localhost | Any localhost port, including 3000/5173 | Remote origins |
localhost:5173 | Port 5173 only | Other ports |
Contact the team for domain changes.
Local development
Register localhost or localhost:PORT. Iframe CSP accepts HTTP and HTTPS.
Validate a key
Unauthenticated; no scan:
GET https://api.scanner.net/embeds/validate?key={API_KEY}Valid:
{ "valid": true, "domains": ["app.example.com", "staging.example.com"] }Invalid:
{ "valid": false, "domains": [] }Preflight rotated/disabled/mistyped keys before mounting; cross-origin iframes cannot report invalid-key state to hosts.
Errors
| Status | Code | Meaning |
|---|---|---|
| 403 | EMBED_KEY_INVALID | Invalid/unknown key |
| 403 | EMBED_ORG_DISABLED | Organization disabled by admin |
| 403 | EMBED_DOMAIN_REJECTED | Origin/fallback Referer outside configured domains, or both absent under restrictions. Check domains; server calls use API keys |