Developers » API methods » Account » account.registerDevice
Accountaccount.registerDevice
Subscribes an iOS/Android/Windows/Mac based device to receive push notifications
Please note that for correct push notifications work, it is necessary to fill the bundle_id field in the application settings.
This method can be called with a user token received in Standalone-app via Implicit Flow. Access rights required: messages.
Parameters
tokenDevice token used to send notifications. (for mpns, the token shall be URL for sending of notifications).
string, required parameter
device_modelString name of device model.
string
device_yearDevice year.
int (number)
device_idUnique device ID.
string, required parameter
system_versionString version of device operating system.
string
settingsPush settings in a special format.
JSON data, accessible for versions from 5.31
sandboxFor iOS devices. 1 Ś to use sandbox server.
flag, either 1 or 0, default 0
Show options for only old API versions
no_text1 Ś not to pass message text in push notification. 0 Ś (by default) message text is sent.
int (number), outdated option, only for versions before 5.31
subscribelist of notification types to send. Following types can be sent: msg, friend, call, reply, mention, group. Sent by default: msg, friend.
string, outdated option, only for versions before 5.31
If there is no settings field in the request, the current settings will be applied.
For the new device ID token, the latest settings for this device_id will be applied.
Result
In case of success returns 1.

In iOS and Windows Phone push notifications will be shown unprocessed.
In Android events will be received in the following format.

Errors
Global errors can occur while running. See their descriptions on this page.