Friends
Chat History
Returns the message history of a conversation with a friend (up to 50 messages), ordered oldest to newest.
POST
/api/vaneltonid/chat_history.php
Requires
Authorization: AppID:AppKey + user tokenRequest body
| Field | Type | Required | Description |
|---|---|---|---|
| token | string | required | User's session token |
| friend_id | int | required | ID of the friend |
| limit | int | optional | Number of messages to return (1–50). Default: 50 |
Test this endpoint
Headers
Body
Success response 200
{
"success": true,
"count": 3,
"server_time": "2026-05-29 14:35:00",
"messages": [
{
"id": 499,
"sender_id": 10,
"sender_username": "friend1",
"sender_profileimg": "https://...",
"message": "Hey!",
"created_at": "2026-05-29 14:30:00"
},
{
"id": 500,
"sender_id": 42,
"sender_username": "me",
"message": "Hey! All good?",
"created_at": "2026-05-29 14:31:00"
}
]
}
Save the server_time from this response as the initial since value for chat_poll.