AppHub Tether
Session
Registers or updates your app's current session state in the launcher. AppHub uses this data automatically when a user sends a game invite from the Friends panel or overlay — so your room_data is always included without extra work from the player.
POST
http://127.0.0.1:7420/session
This endpoint requires AppHub Store to be running on your machine. The live tester calls your local AppHub instance directly.
Call this endpoint whenever your session state changes: when a room is created, when the joinability changes (loading screen, private session), or when the session ends. The session is stored in memory only and cleared automatically when your process exits.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
| appid | string | required | Your app's packagename |
| room_data | object | optional | Any JSON object your multiplayer system needs to join the session (room code, host IP, server ID, join token, etc.). Passed through unchanged in all invites sent from the launcher. |
| joinable | boolean | optional | Default true. Set to false during loading screens, cutscenes, or private sessions — the launcher disables the Invite button automatically while unjoinable. |
Test this endpoint
Headers
Body
Success response 200
{ "ok": true }
Typical usage pattern
// Room created — session is open and joinable
POST /session { appid, room_data: { room_id: "abc-123" }, joinable: true }
// Loading next level — temporarily unjoinable
POST /session { appid, room_data: { room_id: "abc-123" }, joinable: false }
// Level loaded — joinable again
POST /session { appid, room_data: { room_id: "abc-123" }, joinable: true }
// Back to main menu — no active session
POST /session { appid, room_data: null, joinable: false }
Notes
| Detail | Description |
|---|---|
| Launcher UI invites | When a user right-clicks a friend in the Friends panel, AppHub uses the current session's room_data automatically. No code needed in the game at that point. |
| Memory only | Session state is never written to disk. It is cleared automatically when your process exits — no cleanup endpoint needed. |
| Invite button | While joinable is false, the Invite button in the launcher overlay is disabled. The launcher re-enables it as soon as you send joinable: true. |
| No session set | If you never call /session, launcher UI invites will be sent with room_data: null. Handle that case in your app by generating a fresh room rather than trying to join a specific one. |