The translation was generated automatically and may contain mistakes
Interaction with the application
If the script is difficult or inconvenient to implement in correspondence, connect to the bot mini-application . For example, in a mini-app, you can arrange a section of bot settings or organize the filling of an application instead of messaging.
Features of work
- •For data exchange, the mini-application must be established in the community .
- •The bot must be configured to receive events via Callback API or Long Poll API .
- •The bot cannot send data to the mini-application directly. If the mini-application needs to receive data from the bot, use its own API.
Transferring data from mini-application to bot
Data from the mini-application can be passed via an event VKWebAppSendPayload The VK Bridge Library.
After calling the method, the bot will receive an event message_new . Data from the mini-application will come as a JSON string in the field payload .
Запуск мини‑приложения из бота
In order for the user to immediately get into the desired section when launching the mini-application, pass the parameter hash .
More information about navigation and working with mini-application screens - in the section Library vk-mini-apps-router .
Materials on the topic
- •
- •
- •