I try to set up a web hook api telegram. Faced such a problem.

output from getwebhookinfo

When a telegram tries to send a request to a registered (successfully) url, screenshot of successful registration

gets "connection timed out". The fact that if you do the same through postman, the answer is 200 and everything works.

SSL is

certificate screenshot

Maybe there are people who have encountered a similar problem. Help me please.


UPD: noticed a bunch of transitions to the site. Why do you go there?)


UPD 2: I sin on hosting. I use Hostinger. Is there any way to test my theory? And which host would be better if replaced

  • Too little information. Most likely, your code does not have time to work for a certain time and the Telegram server resets the connection. - getjump
  • How can I check this? What information should I add? If my code does not have time to work, then how could I add this URL to the webbook? - Andrey B
  • Check, for example, profiling code. The simplest, for example, is to write to a file when reaching some places and measure the time of execution. When installing a webhuk, telegrams do not request a reverse URL, only on further events. - getjump
  • Explain what you want to profile. I have a stub there that writes to the log if someone has requested a page. I use postman - writes to the log. I am writing to the telegram chat, the log is empty, I get the latest state of the web hook "Connection timed out" - Andrey B

0