Presence
RallyHere Presence API
This API is intended to generally store presence information and be used in order to track the concurrent users for the game as a whole.
Basic Usage
On login, a client should go through the following steps.
- Get any existing current presence data and store that locally using GET
/v1/player/me/presence. - Mark online by patching their own presence with an empty update using PATCH
/v1/player/presence. - Request the client visible settings using GET
/v1/settingsand store them. - Every
self_ping_interval_secondsthe client should mark online again by patching their own presence with an empty update using PATCH/v1/player/presence
Setting Presence
When updating your presence the display_name and platform are not set directly. They are instead derived from the JWT provided by the users-api.
The presence you set is considered public, so do not set any values that should be considered private data in either the status_message or the
custom_data.
Fetching Presence
You may fetch the presence of another user by either their player_id or player_uuid. You should prefer the player_uuid whenever it is available
as the player_id is deprecated.
Private Presence Data
last_seen is only available when requesting presence for yourself or as an admin.
Concurrent Users Updates
It's expected that users of this API will regularly patch their own presence with an empty update. This will signal that they are still online without
changing any of their presence information. This should be done on a cycle based on the self_ping_interval_setting settings provided by the API on
the /v1/settings endpoint conforming to the ClientVisibleSettings schema.
If a client takes longer than the last_seen_age_considered_offline_seconds setting to perform this update they will be considered offline by other
clients. This setting is provided by the API on the /v1/settings endpoint conforming to the ClientVisibleSettings schema.
📄️ Get Player Presence Self
Get the player's presence information. The status reflects the true value and is not modified before it
📄️ Update Player Presence Self
Update the player's online status and other presence data.
📄️ Get Player Presence Public By Uuid
Get the player's presence information. The status will be modified based on the following rules:
📄️ Get Player Presence Public By Id
Get the player's presence information. The status will be modified based on the following rules:
📄️ Get Presence Settings
Settings which help tell the client how it should interact with this service.