Console
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 token

Request body

FieldTypeRequiredDescription
tokenstringrequiredUser's session token
friend_idintrequiredID of the friend
limitintoptionalNumber of messages to return (1–50). Default: 50

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.