# Poll Telegram API until response

**URL:** <https://forum.elixirforum.com/t/poll-telegram-api-until-response/16246>\
**Category:** Questions\
**Tags:** asynchronous\
**Created:** [September 2, 2018, 3:56pm UTC](https://forum.elixirforum.com/t/poll-telegram-api-until-response/16246 "2018-09-02T15:56:57Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![kannix](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kannix/32/6046_2.png) [@kannix](https://forum.elixirforum.com/u/kannix)\
**Post date:** [September 2, 2018, 4:57pm UTC](https://forum.elixirforum.com/t/poll-telegram-api-until-response/16246/3 "2018-09-02T16:57:31Z")

</div>

> [@idi527](#):
>
> Have you considered using webhooks?

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

---

_[View the full topic](https://forum.elixirforum.com/t/poll-telegram-api-until-response/16246)._
