Skip to content

GramIO API Reference / @gramio/contexts/dist / WebAppData

Class: WebAppData ​

Defined in: contexts/index.d.ts:3278

Contains data sent from a Web App to the bot.

Constructors ​

Constructor ​

new WebAppData(payload): WebAppData

Defined in: contexts/index.d.ts:3280

Parameters ​

ParameterType
payloadTelegramWebAppData

Returns ​

WebAppData

Properties ​

PropertyTypeDefined in
payloadTelegramWebAppDatacontexts/index.d.ts:3279

Accessors ​

buttonText ​

Get Signature ​

get buttonText(): string

Defined in: contexts/index.d.ts:3287

Text of the web_app keyboard button, from which the Web App was opened. Be aware that a bad client can send arbitrary data in this field.

Returns ​

string


data ​

Get Signature ​

get data(): string

Defined in: contexts/index.d.ts:3282

The data. Be aware that a bad client can send arbitrary data in this field.

Returns ​

string