Ir al contenido

Preguntas

Herramienta del panel que recoge preguntas del chat con un comando configurable (por defecto !pregunta). Tú las gestionas en la bandeja: responder, pasar o quitar. El overlay de OBS muestra la pregunta actual y cuántas quedan en cola.

Solo dashboard
AutenticaciónRequiere sesión OAuth del panel (cookie HttpOnly). No uses la API Key de bot en el navegador del overlay.

Abre Preguntas en el panel. Usa el botón Overlay para copiar la URL firmada. El chat se escucha en el navegador: deja la pestaña abierta mientras recojas preguntas.

API del overlay

El panel genera un enlace firmado (overlayToken, scope overlay:read, válido 30 días) y sincroniza el estado entre el dashboard y OBS.

Generar enlace

POSThttps://ttv.losperris.dev/api/dashboard/overlay-link
ParámetroTipoRequeridoDescripción
toolStringquestions
curl --request POST \

  --url 'https://ttv.losperris.dev/api/dashboard/overlay-link' \

  --header 'Content-Type: application/json' \

  --cookie 'tu_sesion_dashboard' \

  --data '{"tool":"questions"}'
	{"url": "https://ttv.losperris.dev/overlay/questions?overlayToken=eyJ..."}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{

  "url": "https://ttv.losperris.dev/overlay/questions?overlayToken=eyJ..."

}
	{"success": false,"error": {"message": "Usuario no encontrado","code": "UNAUTHORIZED"}}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{

  "success": false,

  "error": {

    "message": "Usuario no encontrado",

    "code": "UNAUTHORIZED"

  }

}

Estado compartido

GEThttps://ttv.losperris.dev/api/dashboard/overlay-state/questions

Lee el estado publicado por el panel. El overlay en OBS usa el token de la URL; el panel usa la sesión del dashboard.

	{"state": {"isActive": true,"keyword": "pregunta","pendingCount": 3,"current": { "displayName": "Viewer1", "text": "¿Cuál es tu juego favorito?" },"updatedAt": 1752012234567}}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{
  "state": {
    "isActive": true,
    "keyword": "pregunta",
    "pendingCount": 3,
    "current": { "displayName": "Viewer1", "text": "¿Cuál es tu juego favorito?" },
    "updatedAt": 1752012234567
  }
}
	{ "state": null }
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{ "state": null }
	{"success": false,"error": {"message": "Usuario no encontrado","code": "UNAUTHORIZED"}}
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{

  "success": false,

  "error": {

    "message": "Usuario no encontrado",

    "code": "UNAUTHORIZED"

  }

}
PUThttps://ttv.losperris.dev/api/dashboard/overlay-state/questions
ParámetroTipoRequeridoDescripción
stateObjectJSON con el estado de la herramienta (máx. 64 KB, máx. 200 claves).
	{ "success": true }
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{ "success": true }
	{"success": false,"error": {"message": "Solo el panel puede publicar el estado del overlay.","code": "FORBIDDEN"}}
HTTP/1.1 403 Forbidden
Content-Type: application/json; charset=utf-8
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{

  "success": false,

  "error": {

    "message": "Solo el panel puede publicar el estado del overlay.",

    "code": "FORBIDDEN"

  }

}
  1. En el panel, pulsa Overlay y copia la URL (incluye overlayToken de solo lectura).
  2. Opcional: elige color y tamaño en el mismo modal; van en la URL (?color= y ?scale=), sin peticiones extra.
  3. En OBS, añade una fuente Navegador (Browser Source).
  4. Pega la URL, usa 800 × 280 px (o el ancho de tu escena) y fondo transparente.
  5. Marca Actualizar navegador cuando la escena se active.
  6. En el panel, elige quién puede preguntar, configura el comando y pulsa Iniciar.
  • Comando: por defecto pregunta (el viewer escribe !pregunta texto). Puedes cambiarlo antes de iniciar.
  • Filtros: elige qué roles pueden preguntar (subs, mods, VIPs, viewers). Hace falta al menos uno.
  • Bandeja: la pregunta más reciente pendiente es la actual. Respóndela, pásala o quítala.
  • Overlay: muestra la pregunta actual y un contador de cola. Si estás escuchando y aún no hay preguntas, enseña una espera con el comando.
  • Sincronización: el panel publica el estado solo cuando cambia la pregunta o la cola (poll lento en OBS, como Tendencias).

El panel publica este objeto en PUT /dashboard/overlay-state/questions y el overlay lo lee con GET. Solo envía la pregunta actual (no todo el historial):

	{"state": {"isActive": true,"keyword": "pregunta","pendingCount": 3,"current": {"displayName": "Viewer1","text": "¿Cuál es tu juego favorito?"},"updatedAt": 1752012234567}}
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{
"state": {
  "isActive": true,
  "keyword": "pregunta",
  "pendingCount": 3,
  "current": {
    "displayName": "Viewer1",
    "text": "¿Cuál es tu juego favorito?"
  },
  "updatedAt": 1752012234567
}
}
	{ "state": null }
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Cache-Control: public, s-maxage=10, stale-while-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1710000060

{ "state": null }