Subscribe to lobby events (SSE)
curl --request GET \
--url https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events \
--header 'api-key: <api-key>' \
--header 'x-player-id: <x-player-id>'import requests
url = "https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events"
headers = {
"x-player-id": "<x-player-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-player-id': '<x-player-id>', 'api-key': '<api-key>'}
};
fetch('https://api.computeflow.cloud/api/v3/lobbies/{config}/me/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.computeflow.cloud/api/v3/lobbies/{config}/me/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 => [
"api-key: <api-key>",
"x-player-id: <x-player-id>"
],
]);
$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.computeflow.cloud/api/v3/lobbies/{config}/me/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-player-id", "<x-player-id>")
req.Header.Add("api-key", "<api-key>")
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.computeflow.cloud/api/v3/lobbies/{config}/me/events")
.header("x-player-id", "<x-player-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-player-id"] = '<x-player-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"status": 123,
"detail": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}Lobbies
Subscribe to lobby events (SSE)
Opens a Server-Sent Events (SSE) stream for real-time lobby updates. The caller is identified by x-player-id.
Event types:
| Event | Description | Frequency |
|---|---|---|
connected | Initial event with full lobby state | Once on connect |
lobby_updated | Lobby state changed (player joined/left, settings changed, game started, etc.) | On every change |
lobby_deleted | Lobby was deleted (all players left or timeout) | Once, then stream closes |
queue_stats | Live matchmaking queue statistics | Every 10s while in_queue |
ping | Keep-alive heartbeat | Every 30s |
Usage (JavaScript):
const es = new EventSource('/api/v3/lobbies/casual/me/events', {
headers: { 'api-key': 'pf_...', 'x-player-id': 'player123' }
});
es.addEventListener('lobby_updated', (e) => {
const lobby = JSON.parse(e.data);
updateUI(lobby);
});
Connection lifecycle: The stream stays open until the client disconnects, the lobby is deleted, or the player is kicked. Reconnect automatically on disconnect.
GET
/
api
/
v3
/
lobbies
/
{config}
/
me
/
events
Subscribe to lobby events (SSE)
curl --request GET \
--url https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events \
--header 'api-key: <api-key>' \
--header 'x-player-id: <x-player-id>'import requests
url = "https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events"
headers = {
"x-player-id": "<x-player-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-player-id': '<x-player-id>', 'api-key': '<api-key>'}
};
fetch('https://api.computeflow.cloud/api/v3/lobbies/{config}/me/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.computeflow.cloud/api/v3/lobbies/{config}/me/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 => [
"api-key: <api-key>",
"x-player-id: <x-player-id>"
],
]);
$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.computeflow.cloud/api/v3/lobbies/{config}/me/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-player-id", "<x-player-id>")
req.Header.Add("api-key", "<api-key>")
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.computeflow.cloud/api/v3/lobbies/{config}/me/events")
.header("x-player-id", "<x-player-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.computeflow.cloud/api/v3/lobbies/{config}/me/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-player-id"] = '<x-player-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"error": "<string>",
"status": 123,
"detail": "<string>"
}{
"error": "<string>",
"status": 123,
"detail": "<string>"
}