by Anthony Axenov
Just receiving messages from user (long polling) and reply them with some data. Extend this flow for your purposes! This is just an example but you really can do anything with your phone via telegram.
Basically the whole flow was built around two types of HTTP requests: the first one is to get updates from API and the second one replies user.
There are 5 actions you can do via this flow:
- Dice: throw a dice
- USSD: execute your carrier's command (from `ussd` var) and receive it's result
- GPS: get current GPS location of device
- Debug: get some info about message
- Battery: get current battery status
Also there is 6th branch to get screenshots (`screen` command) but I don't know why I always get error 400 from TG API in this part :( Maybe you could fix it.
Keyboard for these commands also available.
What you need to do to make this flow work is:
1) Set your `bot_token` var (in "double quotes")
2) Set your own ID or username (in "double quotes") as `admin_id` to secure your phone and ignore commands from anybody except you (because any tg bot is public)
3) Set your `ussd` command to any you want (in "double quotes")
4) Give all permissions needed (don't worry, I will not use it for bad purposes, purposes) or your deactivate blocks you don't need or doubt about
5) Adjust delay block at the bottom
Bot API docs: https://core.telegram.org/bots/api
Rate and review within the app in the Community section.