Docs
Connect your game or app to Live Chat API using HTTP for auth and WebSockets for real-time rooms.
Godot plugin
Official Godot 4 addon (v1.0.0-alpha, Godot 4.7.1+): store.godotengine.org/asset/xstreamio/bdg-chat
- Install
addons/bdg_chatand enable the BDG Chat plugin. - Add a
BDGChatClientnode (or open the includedchat_demo.tscn). - Set
app_idand aplayer_tokenminted on your server, thenconnect_to_chat()andjoin("lobby").
$Chat.app_id = "app_xxxxxxxx"
$Chat.player_token = player_jwt_from_your_game_server
$Chat.connect_to_chat()
await $Chat.connected
$Chat.join("lobby")
$Chat.send_chat("hello")
Do not put sk_live_... in a shipped game. Use BDGPlayerTokens.mint() only on a trusted server.
Unity plugin
Same protocol as Godot. Package: unity/com.xstreamio.bdg-chat (Unity 2021.3+, editor and standalone). Add via Package Manager → Add package from disk.
var chat = gameObject.AddComponent<XStreamIO.BDGChat.BDGChatClient>();
chat.AppId = "app_xxxxxxxx";
chat.PlayerToken = playerJwtFromYourGameServer;
chat.Connected += () => chat.Join("lobby");
chat.ChatReceived += (text, name, id, ts, room) => Debug.Log(name + ": " + text);
chat.ConnectToChat();
Mint tokens with BDGPlayerTokens.Mint(appId, sk_live_..., displayName) on your game server only.
Overview
Live Chat API has two channels:
- HTTP — register, login, account info, apps, player tokens
- WebSocket — join rooms, chat, presence, history
Base URLs
| Channel | URL |
|---|---|
| HTTPS API | https://aponteplace.io |
| WebSocket | wss://aponteplace.io/ws |
1. Register a studio account
POST /register
Content-Type: application/json
{
"email": "dev@studio.com",
"password": "your-password",
"display_name": "Studio"
}
Returns a developer JWT, and a Default app. The secret is shown once.
{
"token": "eyJ...",
"user_id": 1,
"email": "dev@studio.com",
"display_name": "Studio",
"plan": "free",
"is_paid": false,
"app": {
"public_id": "app_xxxxxxxx",
"name": "Default",
"secret": "sk_live_..."
}
}
2. Login
POST /login
Content-Type: application/json
{ "email": "dev@studio.com", "password": "your-password" }
Same shape as register, plus apps[]. Use the JWT as Authorization: Bearer ….
3. Account
GET /me Authorization: Bearer DEVELOPER_JWT
Returns plan, is_paid, and apps[]. A Default app is created if you have none.
4. Apps
GET /apps
POST /apps
Authorization: Bearer DEVELOPER_JWT
{ "name": "Raid Game" }
POST returns public_id and secret once. Plan limits cap how many apps you can create.
5. Player tokens
Your game server mints these. Do not put sk_live_... in a shipped game client.
POST /apps/app_xxxxxxxx/player-tokens
Authorization: Bearer DEVELOPER_JWT
or Authorization: Bearer sk_live_...
{
"display_name": "PlayerOne",
"player_id": "steam_123"
}
{
"token": "eyJ...",
"app_id": "app_xxxxxxxx",
"player_id": "steam_123",
"display_name": "PlayerOne"
}
6. Join a room
const ws = new WebSocket("wss://aponteplace.io/ws");
ws.onopen = () => {
ws.send(JSON.stringify({
type: "join",
room: "lobby",
app_id: "app_xxxxxxxx",
token: PLAYER_JWT
}));
};
Studio A’s lobby is not Studio B’s lobby. Join requires app_id.
WebSocket messages
| In | Body |
|---|---|
join | room, app_id, token |
chat | text |
leave | |
typing | is_typing |
ping | |
dm | to, text |
| Out | Meaning |
|---|---|
joined | You are in the room; includes users_online |
chat | A message |
user_joined / user_left | Presence |
error | code + message |
Common errors: auth_required, invalid_token, app_required, app_not_found, app_mismatch, app_forbidden.
CORS
Browser calls from this site are allowed. Access-Control-Allow-Origin: *.