LiveAgentStreamPublish live.agent-stream-publish@1

Generated at from openvibe-contracts v0.419.0 and openvibe-sdk v0.161.0.

Version
1.0.0
Owner
live
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/live/agent-stream-publish.v1.json

live.agent-stream-publish@1 (the Agent Streams plan, S1): the publish part of the answer to POST /api/streams/agent (beside the stream, live.agent-stream@1). WHIP_URL is where the desk publishes, TICKET is the publish ticket (wpt_ plus 32 random bytes, base64url; Live keeps only its sha256, it is bound to this stream, this person and one WHIP session, and it lives four hours), and EXPIRES_AT is when the ticket dies. The desk sends the ticket as Authorization: Bearer wpt_… on POST /whip/agent/:id. A ticket that does not match, has expired or names another stream answers 401 invalid_ticket; a second WHIP session while one is up answers 409 already_publishing. POST /api/streams/agent/:id/ticket renews the ticket (the desk renews at three hours) and DELETE /api/streams/agent/:id/ticket revokes it: that is the kill switch, and Live ends the WHIP session at once.

Fields

FieldTypeRequiredDescriptionConstraints
whip_urlstringyes
  • pattern ^https://whip\.openvibe\.live/whip/agent/ags_[0-9A-HJKMNP-TV-Z]{26}$
  • format uri
ticketstringyesThe publish ticket, shown once. Live stores only its sha256.
  • pattern ^wpt_[A-Za-z0-9_-]{43}$
expires_atstringyes
  • format date-time

Examples

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

Valid: one
{
  "whip_url": "https://whip.openvibe.live/whip/agent/ags_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "ticket": "wpt_6bIocK6e9t0_61sljsJulmzmWTDyow2zHbGz6ZhOBXg",
  "expires_at": "2026-11-06T16:00:00.000Z"
}
Rejected: ticket-without-prefix
{
  "whip_url": "https://whip.openvibe.live/whip/agent/ags_01JAB2C3D4E5F6G7H8J9K0MNPQ",
  "ticket": "6bIocK6e9t0_61sljsJulmzmWTDyow2zHbGz6ZhOBXg",
  "expires_at": "2026-11-06T16:00:00.000Z"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('live.agent-stream-publish@1', value);   // { valid, errors: [{ path, message }] }