Console
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
Requires X-AppHub-Token header or Authorization: AppID:AppKey — see Authentication
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

FieldTypeRequiredDescription
appidstringrequiredYour app's packagename
room_dataobjectoptionalAny 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.
joinablebooleanoptionalDefault true. Set to false during loading screens, cutscenes, or private sessions — the launcher disables the Invite button automatically while unjoinable.

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

DetailDescription
Launcher UI invitesWhen 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 onlySession state is never written to disk. It is cleared automatically when your process exits — no cleanup endpoint needed.
Invite buttonWhile 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 setIf 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.