TipsOverlayTokenResult tips.overlay-token-result@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-result.v1.json

tips.overlay-token-result@1: answers about overlay tokens on OpenVibe.Tips (tips.overlay.token.create, tips.overlay.token.revoke). POST /api/v1/overlay-tokens (201) → { token, secret, overlay_url, events_url }: the secret (tovl_…) and the URLs that carry it are shown once; a replay of the same Idempotency-Key answers them as null with a note (revoke that token and create another). GET /api/v1/overlay-tokens → { tokens } (without secrets; active first). POST /api/v1/overlay-tokens/:id/revoke → { token }: revoked at once, and every open overlay stream using it is closed.

Fields

This schema has no named fields.

Examples

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

Valid: list
{
  "tokens": [
    {
      "id": "tovt_01JAB2C3D4E5F6G7H8J9K0MNQA",
      "creator": {
        "type": "user",
        "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
      },
      "scopes": [
        "alerts",
        "goals"
      ],
      "label": "OBS main scene",
      "config_id": null,
      "created_at": "2026-09-25T09:12:40.118Z",
      "last_used_at": null,
      "revoked_at": null,
      "active": true
    }
  ]
}
Valid: minted
{
  "token": {
    "id": "tovt_01JAB2C3D4E5F6G7H8J9K0MNQA",
    "creator": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "scopes": [
      "alerts",
      "goals"
    ],
    "label": "OBS main scene",
    "config_id": null,
    "created_at": "2026-09-25T09:12:40.118Z",
    "last_used_at": null,
    "revoked_at": null,
    "active": true
  },
  "secret": "tovl_Qm9vdHN0cmFwLXRva2VuLWZvci1kb2NzLW9ubHkxMjM",
  "overlay_url": "https://openvibe.tips/overlay/tovl_Qm9vdHN0cmFwLXRva2VuLWZvci1kb2NzLW9ubHkxMjM",
  "events_url": "https://openvibe.tips/overlay/tovl_Qm9vdHN0cmFwLXRva2VuLWZvci1kb2NzLW9ubHkxMjM/events"
}
Valid: replayed
{
  "token": {
    "id": "tovt_01JAB2C3D4E5F6G7H8J9K0MNQA",
    "creator": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "scopes": [
      "alerts",
      "goals"
    ],
    "label": "OBS main scene",
    "config_id": null,
    "created_at": "2026-09-25T09:12:40.118Z",
    "last_used_at": null,
    "revoked_at": null,
    "active": true
  },
  "secret": null,
  "overlay_url": null,
  "events_url": null,
  "note": "the secret is shown once; revoke this token and create another"
}
Valid: revoked
{
  "token": {
    "id": "tovt_01JAB2C3D4E5F6G7H8J9K0MNQA",
    "creator": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "scopes": [
      "alerts",
      "goals"
    ],
    "label": "OBS main scene",
    "config_id": null,
    "created_at": "2026-09-25T09:12:40.118Z",
    "last_used_at": null,
    "revoked_at": "2026-09-25T09:12:41.530Z",
    "active": false
  }
}
Rejected: tokens-not-a-list
{
  "tokens": {
    "id": "tovt_01JAB2C3D4E5F6G7H8J9K0MNQA",
    "creator": {
      "type": "user",
      "id": "usr_01JAB2C3D4E5F6G7H8J9K0MNPQ"
    },
    "scopes": [
      "alerts",
      "goals"
    ],
    "label": "OBS main scene",
    "config_id": null,
    "created_at": "2026-09-25T09:12:40.118Z",
    "last_used_at": null,
    "revoked_at": null,
    "active": true
  }
}

Validate

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