palbaseDocs

Palbase IAP · API

GET/iap/paywalls/templates/{key}/assets/{asset_id}

Download a template asset

A template asset's bytes, of the media type its bytes are; the ETag is their SHA-256 (an unchanged one is 304 to If-None-Match).

Called by your server, with the project's secret key.

Path

keystring · requiredThe template's key.
asset_idstring (uuid) · requiredThe template asset's id.

Headers

If-None-Matchstring · optionalThe ETag of the bytes the client holds.
curl
curl -X GET "https://<your-ref>.palbase.studio/iap/paywalls/templates/<key>/assets/<asset_id>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200The bytes

304Unchanged since the ETag sent as If-None-Match

400The request is malformed, or a field breaks a rule (the error names which)

401No key, not a key of this project, or a token that is not valid (the edge's answer)

403Not the project's secret key (`secret_key_required`)

404No template has such an asset (`template_asset_not_found`)

429Over the project's request limit; Retry-After says when to try again

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation GetPaywallTemplateAsset of iap's contract.