TipsOverlayTokenRequest tips.overlay-token-request@1

Generated at from openvibe-contracts v0.53.0 and openvibe-sdk v0.11.0.

Version
1.0.0
Owner
tips
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/tips/overlay-token-request.v1.json

tips.overlay-token-request@1: bodies of tips.overlay.token.create on OpenVibe.Tips. POST /api/v1/overlay-tokens: { creator?, scopes?, label?, config_id? } mints a token (scopes default to alerts and goals; config_id must be one of the creator's overlay configs); a service names the creator, a person mints for their own page. Needs an Idempotency-Key header (8-200 of A-Z a-z 0-9 . _ : -; 400 idempotency.key_required): a replay with the same key and body returns the first answer, the same key with another body is 422 idempotency.key_reused. GET /api/v1/overlay-tokens?creator= takes no body. Refusals are problem+json: 422 tips.invalid_input or tips.text_too_long; 404 tips.overlay_config_not_found or tips.creator_not_found; 409 tips.too_many_tokens (25 active at most); 403 capability.denied or tips.forbidden. Unknown fields are ignored.

Fields

This schema has no named fields.

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: list
{}
Valid: mint
{
  "creator": {
    "type": "user",
    "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
  },
  "scopes": [
    "alerts"
  ],
  "label": "OBS main scene",
  "config_id": "tovc_01JAB2C3D4E5F6G7H8J9K0MNQB"
}
Rejected: bad-scope
{
  "scopes": [
    "chat"
  ]
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('tips.overlay-token-request@1', value);   // { valid, errors: [{ path, message }] }