Poll Telegram API until response

yep but i think it won’t help me very much..

I am using this in some browser automation where i will forward a two factor authentication code from sms to telegram to the login process handling.. so i will end up with something like that:

Fill in email + password → click button to login → click button to send the sms → wait for sms code

Where “wait for sms code” will most likely be something similar to what I am doing now with the only difference that the waiting loop will be aborted by the webhook and not by my polling logic

Additionally I need some kind of webapp to handle the webhook (including access from the outside) which is not necessary if i use the polling method