Developers » API methods » Messages » messages.getLongPollServer
Returns data required for connection to a Long Poll server.
With Long Poll connection, you can immediately know about incoming messages and other events.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
This method can be called with a community token. Access rights required: messages.
need_pts1 to return the pts field, needed for the messages.getLongPollHistory method.
flag, either 1 or 0
group_idgroup ID (for community messages with a user access token).
positive number
lp_versionLong Poll version. Actual version is 2.

You can find detailed information about version changes at this page.
positive number, default 0, accessible for versions from 5.65
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.
Global errors can occur while running. See their descriptions on this page.
Version historyShow all
audio.getAlbums, audio.addAlbum, audio.editAlbum, audio.addAlbum, audio.deleteAlbum audio.moveToAlbum are deprecated.

auth.restore method has new required last_name parameter.
messages.getLongPollServer method has new lp_version parameter.
ads.getCategories method returns response in a new format.
wall.edit method cannot be used for edit a promotion post. wall.editAdsStealth method should be used instead.