Closed spaiman closed 5 months ago
I was able to get it working:
@UpdateHandler([UpdateType.MESSAGE])
suspend fun commandUpdateMessage(update: ProcessedUpdate, user: User, bot: TelegramBot) {
val webAppData = update.update.message?.webAppData?.data
// process webAppData
}
Just a suggestion: would probably beneficial to add these things to the doc.
All good then!
Hi, it's me again. I was creating a Telegram Mini Apps triggered via reply keyboard markup. Upon sending the data to the backend, I also call
Telegram.WebApp.sendData
. I can see that my bot receives the data:But, I don't know how can I receive and process the data from my bot. Tried with
@CommandHandler
and@InputHandler
to match the data that was sent, but no dice. What's the best way to handle and process the WebAppData?