Base URL
All session endpoints are prefixed with/api/game/session/
.
Authentication
All session endpoints require a valid JWT token in the Authorization header:Start Session
Begin tracking a new player session. Endpoint:POST /api/game/session/start
Headers:
Heartbeat
Keep the session alive and update the last activity timestamp. Endpoint:POST /api/game/session/heartbeat
Headers:
End Session
Stop tracking the current session. Endpoint:POST /api/game/session/stop
Headers:
Session Management Best Practices
- Start Session: Call when the player begins playing your game
- Heartbeat: Call periodically (every 5-10 minutes) to keep the session active
- End Session: Call when the player stops playing or closes the game