Developers » VK Bridge events
VK Bridge Initializing
bridge.send("VKWebAppInit", {});

VKWebAppInit is the first event your app should send to the official client to start working with VK Bridge. Otherwise, the app may not work on iOS and Android mobile clients.
Enabling Notifications
bridge.send("VKWebAppAllowNotifications", {});

VKWebAppAllowNotifications allows to request user consent for sending notifications from the app.
Sandbox
Platforms
iOS, Android, Web
Parameters

Result
If user allowed notifications VKWebAppAllowNotificationsResult event will be triggered with the only result (boolean), field containing true.
{
  "type": "VKWebAppAllowNotificationsResult",
  "data": {
    "result": true
  }
}

If user didn't allow notifications VKWebAppAllowNotificationsFailed event will be triggered with additional data.
{
  "type": "VKWebAppAllowNotificationsFailed",
  "data": {
     "error_type": "..."
     "error_data": {
        ...
     }
  }
}
Disabling Notifications
bridge.send("VKWebAppDenyNotifications", {});

VKWebAppDenyNotifications allows to disable app's notifications.
Sandbox
Platforms
iOS, Android, Web
Parameters

Result
If user disabled notificationsVKWebAppDenyNotificationsResult event will be triggered with the only disabled (boolean), field containing true value.
{
  "type": "VKWebAppDenyNotificationsResult",
  "data": {
    "disabled": true
  }
}

If user cancelled disabling notifications VKWebAppDenyNotificationsFailed event will be triggered with additional data.
{
  "type": "VKWebAppDenyNotificationsFailed",
  "data": {
     "error_type": "..."
     "error_data": {
        ...
     }
  }
}