curl --request GET \
--url https://api.qbank.cl/platform/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyStream de eventos en tiempo real (SSE)
Abre una conexión text/event-stream que entrega en tiempo real todos los eventos de la cuenta — los mismos que viajan por webhook, sin que expongas un endpoint público.
Cada evento lleva id: (cursor monótono), event: (el tipo de evento) y data: (JSON con el mismo event_id del webhook, así ambos canales se cruzan).
Reconecta con el header Last-Event-ID (o ?last_event_id=) y el servidor replaya lo que te perdiste antes de seguir en vivo. El EventSource nativo no puede mandar el header Authorization: usa fetch con ReadableStream.
El alcance sale de la credencial: una credencial de cuenta recibe sus propios eventos; una credencial org-admin con ops:read recibe el canal de toda la organización y puede acotarlo con ?account_id=.
La conexión manda : ping cada 20s, revalida la sesión cada 60s (una sesión revocada cierra el stream con el evento de control unauthorized) y se cierra a los 30 minutos con un evento de control reconnect.
curl --request GET \
--url https://api.qbank.cl/platform/v1/events \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qbank.cl/platform/v1/events"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qbank.cl/platform/v1/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qbank.cl/platform/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qbank.cl/platform/v1/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qbank.cl/platform/v1/events")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qbank.cl/platform/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyAutorizaciones
JWT de sesión (de register/login) o llave de API (pk_...).
X-API-Key: <token> se acepta como header alternativo.
Encabezados
Cursor de reconexión. Alternativa al header Last-Event-ID para clientes con fetch.
Parámetros de consulta
Cursor de reconexión. Alternativa al header Last-Event-ID para clientes con fetch.
Tipos de evento separados por coma para filtrar. Un tipo desconocido responde 400 invalid_event_type.
Con true, el primer evento es snapshot con el estado actual absoluto (saldos y, para org-admins, salud operativa) antes de los deltas en vivo.
Solo org-admin: acota el canal de la organización a una sola cuenta.
Respuesta
Stream de eventos abierto. El cuerpo queda abierto y se escribe incrementalmente.
The response is of type string.