messages.sendWebViewData

Used by the user to relay data from an opened reply keyboard bot web app to the bot that owns it.

 Method schema is available as of layer 140. Switch ยป

Parameters

Name Type Description
bot InputUser Bot that owns the web app
random_id long Unique client message ID to prevent duplicate sending of the same event
button_text string Text of the keyboardButtonSimpleWebView that was pressed to open the web app.
data string Data to relay to the bot, obtained from a web_app_data_send JS event.

Result

Updates

Related pages

keyboardButtonSimpleWebView

Button to open a bot web app using messages.requestSimpleWebView, without sending user information to the web app.

Can only be sent or received as part of a reply keyboard, use keyboardButtonWebView for inline keyboards.

Web events

How telegram apps interact with webpages

Bot web apps

Bots can offer users interactive HTML5 web apps to completely replace any website.