Polling has its own request object in python-telegram-bot 22.8. A successful ordinary API call therefore does not prove that getUpdates received the same proxy route.

For a polling application, configure both paths:

from telegram.ext import Application

proxy_url = 'http://proxy-user:[email protected]:8080'
application = (
    Application.builder()
    .token(bot_token)
    .proxy(proxy_url)
    .get_updates_proxy(proxy_url)
    .build()
)

proxy configures general Bot API operations; get_updates_proxy configures polling. Continue using the existing handlers and polling or webhook lifecycle around this application construction.

The URL credentials are placeholders. Obtain real values through the deployment's credential mechanism and percent-encode reserved characters in the URL components. Use the intermediary's actual scheme: HTTPXRequest accepts HTTP proxy URLs and supports SOCKS5 with the package's required SOCKS dependency. The SOCKS5 proxy list supplies endpoint candidates for that protocol, not proxy-account credentials.

If the application supplies custom objects through request or get_updates_request, configure those objects consistently instead. A builder proxy setting and a separately supplied request object are alternative inputs to the corresponding path.

Older Updater recipes using request_kwargs and urllib3_proxy_kwargs target another generation.

Artihkkalat mat laktásit