messages

messages.getLongPollServer

Returns data required for connection to a Long Poll server.

To call this method, you can use:
• community access token (access rights required: messages)

Parameters

need_pts

checkbox

1 — to return the pts field, needed for the messages.getLongPollHistory method.

group_id

integer

group ID (for community messages with a user access token).

lp_version

positive

Long Poll version. Actual version is 2.

You can find detailed information about version changes at this page.

Result

Returns an object with key, server, ts fields. With such data you can connect to an instant message server to immediately receive incoming messages and other events.

Error codes

Common errors may occur during execution