Skip to content

Friends and Presence

automoto edited this page Aug 1, 2026 · 1 revision

Friends and Presence

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.

Friends

  • GET /v1/friends lists your friends and pending requests.
  • POST /v1/friends/{player_id}/request sends a request; /accept and /reject answer one.
  • POST /v1/friends/{player_id}/block and /unblock manage 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.

Presence

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.

Example

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.

Clone this wiki locally