Skip to content
Livstick Developers

Issue a view token

Method POST https://<client-api-host>/api/v3.1/containers/{crid}/view-tokens

Issue a short-lived viewToken for the Livstick widget in view mode, so the page of the beneficiary or the buyer can show a message without holding the recipient link. A view token gives neither reactions nor "seen" marking. The response does not carry the urid.

Authorization

Required scope tokens:view

Use Authorization: Bearer liv_<prefix>_<secret>. The key must belong to a platform served by the V3 pipeline; otherwise every route answers 403 PLATFORM_NOT_V3.

Parameters

Name In Type Required Constraints Description
crid Path string Required Your business reference of the container.

Request body

Required application/json Schema V31ViewTokenRequest

Name Type Required Description
scope string Required Values viewer owner
mrid string Optional Optional; must exist. Constraints pattern ^[A-Za-z0-9:_-]{1,64}$
expiresIn integer Optional Lifetime in seconds. Default 900 Constraints min 60, max 3600

Responses

201 application/json Schema V31ViewTokenResponse

Token issued.

400 application/json Schema V31ErrorEnvelope

Invalid payload, unknown field or invalid value.

json 400
{
  "error": {
    "code": "DATA_INVALID",
    "message": "Invalid field crid"
  }
}

401 application/json Schema V31ErrorEnvelope

Authentication failed or missing bearer token.

json 401
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Missing API key"
  }
}

403 application/json Schema V31ErrorEnvelope

Authenticated but not allowed: missing scope (FORBIDDEN), invalid platform constraints (INVALID_PLATFORM_CONSTRAINTS) or a platform not served by API v3.1 (PLATFORM_NOT_V3).

json 403
{
  "error": {
    "code": "PLATFORM_NOT_V3",
    "message": "Platform is not served by API v3.1"
  }
}

404 application/json Schema V31ErrorEnvelope

Container or message not found (NOT_FOUND, MESSAGE_NOT_FOUND).

json 404
{
  "error": {
    "code": "MESSAGE_NOT_FOUND",
    "message": "Message not found"
  }
}

429 application/json Schema V31ErrorEnvelope

Rate limit exceeded.

json 429
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Too many requests"
  }
}

500 application/json Schema V31ErrorEnvelope

Unexpected server error.

json 500
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal error"
  }
}