Closed bvicini closed 1 year ago
Sorry, labeled as bug by mistake.
Are you sure the proxy you've set using HTTPS_PROXY
is valid and you're able to establish a connection?
Alternate way is to host your own version of the Telegram Bot API instance somewhere where you can access by setting the base_bot_url
. Docs can be found here
Yes, I am sure, I use it as system wide proxy, for any internet connection. Thank you for pointing me to docs, I give it a try. I tested that I can call external API's through the proxy using Http facade in laravel, maybe the problem is with curl or something else. See you and.. very good work!
After a long time non working on this, the problem is now solved: just a typo in the .env file specification of the proxy address :(. Ty very much!
PHP version
8.1 - 8.2
irazasyed/telegram-bot-sdk version
versions : * v3.11.0
Laravel version (if any)
versions : * v10.9.0
Code To Reproduce the bug
A call to Telegram::getUpdates() timeout because I can't go through our corporate proxy. Everything works well if executed from outside the LAN behind the proxy server. I added HTTPS_PROXY entry in .env file and cleared the config, with no results.
Error stacktrace (if any)
cURL error 28: SSL connection timeout (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.telegram.org/botxxxxxxxxxx:xxxxxxxxxxxxxxxxxxxx/getUpdates
at vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210 206▕ } 207▕ 208▕ // Create a connection exception if it was a specific error code. 209▕ $error = isset($connectionErrors[$easy->errno]) ➜ 210▕ ? new ConnectException($message, $easy->request, null, $ctx) 211▕ : new RequestException($message, $easy->request, $easy->response, null, $ctx); 212▕ 213▕ return P\Create::rejectionFor($error); 214▕ }