Telegram introduced Bot Web App View recently, and I need from my bot, which is running in Python, to send a custom payload of data to the site. I know that the site can get stuff like color schemes, user info and so on, but I need my custom packet as well. I really need to use the web app as just an interface to a really, really small database (~30 items) in json. (Other solutions, like storing the database with the website is not useful nor convenient to me)
Is this even possible? I’ve tried looking everywhere, but I’m not sure.
2
Answers
Custom data cannot be currently transmitted from the bot to the webapp as of April 2022.
ofcourse you can, it depends on the webapp you write, following python telegram bot manual i can use my webapp to send payload Json data for my bot.I used javascript in my webapp. for example
1. code in my webapp:
2. my Python code:
async def downloadEIProcess(update: Update, context: ContextTypes.DEFAULT_TYPE) -> None:
data = update.effective_message.web_app_data.data
please give more imformation about your code in order to let me help you out.