Friends
Presence Heartbeat
Updates the user's online status and returns the complete friends list with current presence for each friend. Call every 30 seconds from the launcher.
POST
/api/vaneltonid/presence_heartbeat.php
Requires
Authorization: AppID:AppKey + user tokenRequest body
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | required | User's session token |
| status | string | required | online or in-game |
| current_app | string | optional | App package ID — required when status is in-game |
Test this endpoint
Headers
Body
Success response 200
{
"success": true,
"friends": [
{
"id": 10,
"userKey": "xyz...",
"username": "friend1",
"name": "Friend One",
"profileimg": "https://...",
"status": "in-game",
"current_app": "com.vaneltongd.fzsoccer",
"last_seen": "2026-05-29 14:32:10"
},
{
"id": 11,
"username": "friend2",
"status": "offline",
"current_app": null,
"last_seen": "2026-05-29 13:00:00"
}
],
"unread_notifications": 2
}
Friends are ordered: online → in-game → offline. A user becomes offline automatically when the heartbeat TTL (3 minutes) expires — no explicit logout call is needed.
unread_notifications is a count of unread social notifications (friend requests, game invites, etc.). Use this as a signal to call notifications_poll.