Private Matches
Private matches let two specific players play each other using a 6-character room code. No matchmaking queue — you control who plays who.
Flow
- 1Host creates a session — POST /sessions with matchType: "private". Response includes a roomCode (e.g. "A3F9C1").
- 2Share the room code — Your app delivers the code to the friend — via chat, copy link, QR code, etc.
- 3Friend joins — Friend calls POST /sessions/join with the room code. Receives their own session token.
- 4Both connect — Both players initialise the game client with their respective tokens. Game starts.
Create private session (host)
POST
/v1/sessionsSet matchType to 'private'. Response includes roomCode.
curl -X POST https://api.beta-gamer.com/v1/sessions \
-H "Authorization: Bearer bg_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"game": "chess",
"matchType": "private",
"players": [{ "id": "user_123", "displayName": "Alex" }]
}'{
"sessionId": "a1b2c3d4-...",
"sessionToken": "eyJhbGci...",
"roomCode": "A3F9C1",
"matchType": "private",
...
}Join private session (friend)
POST
/v1/sessions/joinJoin an existing private match using a room code.
curl -X POST https://api.beta-gamer.com/v1/sessions/join \
-H "Authorization: Bearer bg_live_xxxx" \
-H "Content-Type: application/json" \
-d '{
"roomCode": "A3F9C1",
"game": "chess",
"player": { "id": "user_456", "displayName": "Jordan" }
}'Room code details
- Room codes are 6 characters, uppercase alphanumeric (e.g.
A3F9C1). - Codes are unique per tenant — the same code can exist across different tenants without conflict.
- A code is valid until the session moves to
active(both players joined) or expires after 10 minutes. - Subway Runner does not support private matches — it is single-player only.
Beta Gamer GaaS API — questions? support@beta-gamer.com