Skip to content
Maps Embed

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-ancestors blocks 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 Origin nor Referer, including server clients, return the same error. Browsers supply Origin on 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.

RegisteredAcceptedRejected
app.example.comapp.example.comexample.com, other.com
example.comApex and all subdomainsother.com
localhostAny localhost port, including 3000/5173Remote origins
localhost:5173Port 5173 onlyOther 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

StatusCodeMeaning
403EMBED_KEY_INVALIDInvalid/unknown key
403EMBED_ORG_DISABLEDOrganization disabled by admin
403EMBED_DOMAIN_REJECTEDOrigin/fallback Referer outside configured domains, or both absent under restrictions. Check domains; server calls use API keys

View this page as Markdown