OpenVibe.Live/Docs
Source on GitHub

API Tokens#

API tokens provide programmatic access to OpenVibe.Live for bots, integrations, and automation tools.

Overview#

Creating a Token#

Dashboard UI#

  1. Go to your Dashboard
  2. Find the API Tokens card
  3. Click Create Token
  4. Enter a label or use a preset, select scopes, and optionally set an expiration
  5. Copy the token immediately — it will not be shown again

REST API#

curl -X POST https://openvibe.live/api/auth/tokens \
  -H "Authorization: Bearer YOUR_JWT" \
  -H "Content-Type: application/json" \
  -d '{"label": "My Bot", "scopes": ["chat", "read"]}'

Response:

{
  "token": "hbt_a1b2c3d4e5f6...",
  "id": 1,
  "label": "My Bot",
  "scopes": ["chat", "read"]
}

Scopes#

ScopeAccess
chatSend and receive chat messages via WebSocket
readRead streams, VODs, user info
streamStart/stop streams, update stream info
controlHardware control bridge access
vibe_coding_publishPublish sanitized coding-feed events to /ws/vibe-coding/publish

Using a Token#

REST API#

Include the token in the Authorization header:

curl https://openvibe.live/api/streams \
  -H "Authorization: Bearer hbt_YOUR_TOKEN_HERE"

Vibe Coding Publisher#

For the OpenVibe.Live VS Code companion or any other coding-feed publisher, use a token with vibe_coding_publish scope instead of broader stream control when possible.

WebSocket (Chat)#

Pass the token as the token query parameter:

wss://openvibe.live/ws/chat?token=hbt_YOUR_TOKEN_HERE&streamId=123

The token works everywhere a JWT would — the server auto-detects the hbt_ prefix and validates accordingly.

Managing Tokens#

List tokens#

curl https://openvibe.live/api/auth/tokens \
  -H "Authorization: Bearer YOUR_JWT"

Revoke a token#

curl -X DELETE https://openvibe.live/api/auth/tokens/TOKEN_ID \
  -H "Authorization: Bearer YOUR_JWT"

Note: Tokens cannot create or revoke other tokens (must use JWT auth for token management).

Bot Example#

A minimal Node.js chat bot:

const WebSocket = require('ws');

const TOKEN = 'hbt_your_token_here';
const STREAM_ID = '123';

const ws = new WebSocket(
  `wss://openvibe.live/ws/chat?token=${TOKEN}&streamId=${STREAM_ID}`
);

ws.on('open', () => {
  console.log('Connected to chat');
});

ws.on('message', (data) => {
  const msg = JSON.parse(data);
  if (msg.type === 'chat' && msg.message.startsWith('!hello')) {
    ws.send(JSON.stringify({
      type: 'chat',
      message: `Hello ${msg.username}!`
    }));
  }
});

Security Notes#

This page is rendered from docs/api-tokens.md in the OpenVibe.Live repository. Found a mistake? Edit it there.