Assessor.io API v2 (public) - Embed tokens
Mint a short-lived token admitting one respondent to one assessment, inside one website (the "controlled" embed tier). CALL THIS FROM YOUR BACKEND, NEVER FROM A BROWSER. It requires a service token, which would be public the moment it appeared in page source, and the point of this tier is that a trusted party vouches for the respondent. A token NARROWS what may frame the assessment; it can never widen it. The campaign's registered-origins list still applies and the effective policy is the intersection, so: * a valid token restricts framing to the single origin it names, even when the campaign has several registered — which is how you stop one client's page showing an assessment issued for another's; * an invalid or expired token grants nothing: framing simply falls back to the campaign's own allowlist; * a token naming an origin the campaign has not registered results in no framing at all. The origin must ALREADY be registered under the campaign's Embedding settings before a token can be minted for it (409 otherwise). Minting one for an unregistered origin would sign a promise the framing policy then refuses to keep, leaving the integrator with a valid token and a blank rectangle.
Getting a token, the scopes and the response envelope are explained in Make your first API call and Public API (v2).
Contract Summary
- Version:
1.0.0 - Visibility:
public - Operations:
1 - Tags:
PublicEmbedTokens
Operations
| Method | Path | Summary | Operation ID |
|---|---|---|---|
| POST | /api/v2/public/accounts/{accountId}/embed-tokens | Mint an embed token for one assessment on one origin. | v2MintEmbedToken |