curl -X POST "https://api.scanova.io/qr/Qa1b2c3d4e5f6g7h8/preview-token/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"complete_url": "https://scnv.io/a1b2c3d4"
}
QR Codes
Issue a draft preview token
POST /qr//preview-token/
POST
/
qr
/
{qrid}
/
preview-token
/
curl -X POST "https://api.scanova.io/qr/Qa1b2c3d4e5f6g7h8/preview-token/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"complete_url": "https://scnv.io/a1b2c3d4"
}
Issues a short-lived token that lets the landing app render this QR Code’s unpublished draft without a login — the “Preview” button in the editor.
Takes no request body.
A QR Code that has no
POST https://api.scanova.io/qr/{qrid}/preview-token/
Authorization: 401f7ac837da42b97f613d789819ff93537bee6a
string
required
The QR Code’s
qrid.curl -X POST "https://api.scanova.io/qr/Qa1b2c3d4e5f6g7h8/preview-token/" \
-H "Authorization: 401f7ac837da42b97f613d789819ff93537bee6a"
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"complete_url": "https://scnv.io/a1b2c3d4"
}
The token is a JWT with a short lifetime — about 3600 seconds by default. Mint it when the user opens a preview, not ahead of time, and never embed it in anything long-lived: anyone holding it can read the unpublished draft.
url_hash yet returns 400 — there is no URL to preview against until one is assigned.
Related
- Create a QR Code — the draft state machine this previews.
- Update a QR Code — save a draft, then preview it, then publish.
- Change a QR Code’s short-URL slug — assign the
url_hashthis endpoint requires. - QR Manager overview — the quotas, role permissions, and Trash model shared by every endpoint in this module.
- Management API overview — the auth scheme and quota rules that apply to this endpoint.
Authorizations
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. api.scanova.io) — the same key sent to the regular API host will not authenticate.
Path Parameters
The QR code's qrid — the opaque public identifier returned by the list endpoint, not the numeric id.
Response
A preview token and the URL to use it against.
Was this page helpful?