messages.SendWebViewData

class pyrogram.raw.functions.messages.SendWebViewData

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

Details:
  • Layer: 223

  • ID: DC0242C8

Parameters:
  • bot (InputUser) – Bot that owns the web app

  • random_id (int 64-bit) – Unique client message ID to prevent duplicate sending of the same event

  • button_text (str) – Text of the keyboardButtonSimpleWebView that was pressed to open the web app.

  • data (str) – Data to relay to the bot, obtained from a web_app_data_send JS event.

Returns:

Updates

TL Schema

messages.sendWebViewData#dc0242c8
bot:InputUser
random_id:long
button_text:string
data:string

= Updates

Parameter Tree

SendWebViewData
├── botInputUser
│ ├── InputUserEmpty
│ ├── InputUserSelf
│ ├── InputUser
│ │ ├── user_idlong
│ │ └── access_hashlong
│ └── InputUserFromMessage
│ ├── peerInputPeer
│ │ ├── InputPeerEmpty
│ │ ├── InputPeerSelf
│ │ ├── InputPeerChat
│ │ ├── InputPeerUser
│ │ ├── InputPeerChannel
│ │ ├── InputPeerUserFromMessage
│ │ └── InputPeerChannelFromMessage
│ ├── msg_idint
│ └── user_idlong
├── random_idlong
├── button_textstring
└── datastring

Example

await app.invoke(
    SendWebViewData(
        bot=await app.resolve_user(chat_id),
        random_id=app.rnd_id(),
        button_text="text",
        data="text",
    )
)