Friends
Poll Notifications
Returns all unread social notifications. Call every 5–10 seconds for near-real-time updates. Game invite notifications expire automatically after 5 minutes.
POST
/api/vaneltonid/notifications_poll.php
Requires
Authorization: AppID:AppKey + user tokenRequest body
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | required | User's session token |
Test this endpoint
Headers
Body
Success response 200
{
"success": true,
"count": 2,
"notifications": [
{
"id": 101,
"type": "friend_request",
"from_user_id": 15,
"from_username": "new_friend",
"from_name": "New Friend",
"from_profileimg": "https://...",
"data": null,
"created_at": "2026-05-29 14:30:00"
},
{
"id": 102,
"type": "game_invite",
"from_user_id": 10,
"from_username": "friend1",
"data": { "appid": "com.myapp.game", "room_data": { "room": "room-42" } },
"created_at": "2026-05-29 14:31:00"
}
]
}
Notification types
| Type | Description |
|---|---|
friend_request | You received a friend request |
friend_accepted | Your friend request was accepted |
game_invite | A friend invited you to a game — data.room_data contains join info. Expires in 5 minutes. |
game_invite_accepted | Your game invite was accepted |
game_invite_declined | Your game invite was declined |
After processing notifications, call notifications_read to mark them as read so they stop appearing on the next poll.