-
Notifications
You must be signed in to change notification settings - Fork 2
Friends and Presence
automoto edited this page Aug 1, 2026
·
1 revision
The social layer covers friend relationships and online state. Friends calls sit under /v1/friends, and presence sits at /v1/presence. All of them need the API key and the session token.
-
GET /v1/friendslists your friends and pending requests. -
POST /v1/friends/{player_id}/requestsends a request;/acceptand/rejectanswer one. -
POST /v1/friends/{player_id}/blockand/unblockmanage blocks. -
DELETE /v1/friends/{player_id}removes a friend.
A friend entry carries the other player's id and the display name from their global account.
POST /v1/presence sets a short status string (up to 32 characters), optionally tied to a session_id. Online state and status changes are pushed to friends over the realtime WebSocket, so a client usually sets presence once and then listens. See Realtime WebSocket Events.
curl -s -X POST http://localhost:8080/v1/presence \
-H "Authorization: Bearer <api_key>" \
-H "X-Session-Token: <access_token>" \
-H "Content-Type: application/json" \
-d '{"status":"in lobby"}'Full reference: the /v1/friends/* and /v1/presence operations.