messages.getLongPollHistory
Returns updates in user's private messages.
Parameters
positive
Last value of the ts parameter returned from the Long Poll server or by using messages.getLongPollServer method.
positive
Last value of pts parameter returned from the Long Poll server or by using messages.getLongPollServer method.
positive
Number of characters after which to truncate a previewed message. To preview the full message, specify 0.
NOTE: Messages are not truncated by default. Messages are truncated by words.
checkbox
1 — to return history with online users only.
string
Additional profile fileds to return.
positive
Maximum number of events to return.
positive
Maximum number of messages to return.
positive
Maximum ID of the message among existing ones in the local copy. Both messages received with API methods (for example, messages.getDialogs, messages.getHistory), and data received from a Long Poll server (events with code 4) are taken into account.
integer
group ID (for community messages with a user access token).
positive
Long Poll version.
positive
checkbox
checkbox
Result
Returns an object that contains the following fields:
- •history — An array similar to updates field returned from the Long Poll server, with these exceptions:
- •For events with code 4 (addition of a new message), there are no fields except the first three.
- •There are no events with codes 8, 9 (friend goes online/offline) or with codes 61, 62 (typing during conversation/chat).
- •
- •messages — An array of private message objects that were found among events with code 4 (addition of a new message) from the history field. Each object of message contains a set of fields described here. The first array element is the total number of messages.
Error codes
Common errors may occur during execution