Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.54 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.54 KB

Simple Telegram Web App Bot


  1. Clone repo.
  2. Edit .env-example file, rename it to .env, paste BOT_TOKEN from https://t.me/botfather and paste ENDPOINT (your SERVER DOMAIN to accept requests).
  3. Setup server to accept requests on port 45678 (You can change port in docker-compose.yml and main.py:84).
  4. Now you can: start main.py manually (not recommended) OR use deploy.sh to start Bot in Docker (recommended)
  5. Finally, go to bot PM and use /start

Problems

WebApp doesn't work in web.telegram.org

💁‍♂️ If you use WebApp through the web.telegram.org, then Nginx will be very reluctant to give statics (WILL NOT).

🧐 This is caused by the iframe security policy, which needs to be slightly adjusted in the Nginx settings.

✅ I am attaching a solution to the problem in the screenshot. If you have security settings defined in Nginx, then look for such a setting in your configs and edit it as in my screenshot.

⚠️ Don't forget to use nginx -s reload to update your config changes!

😎 As a result, Nginx will be happy to share static files with users of the web.telegram.org

image

White Screen in TDesktop

💁‍♂️ TDesktop on a PC does not know how to use TLS 1.3, so be sure to specify the ability to use TLS 1.2 in the Nginx config.

P.S. 😕 Now it seems too early for TLS 1.3