E
E
Ermowkin2016-04-07 17:14:10
Telegram
Ermowkin, 2016-04-07 17:14:10

Telegram Bot API. How to properly receive messages without a webhook?

Greetings. Tell me how to correctly receive messages from Telegram from the application without using WebHook.
Is it really necessary to send a getUpdates request every second?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Ermowkin, 2016-04-07
@Ermowkin

Can I have an example request?

N
Nikolai Romanovich, 2016-04-07
@MikalaiR

There is LongPolling. The bottom line is that you send a request, and when something new appears (or timeout), you will be sent a response. And so in the cylinder.

I
IPv4, 2015-03-12
@IPv4

VDS will work anyway if you exit it.
You are probably talking about an application that you launch, and when you exit it closes? Run it through the screen
utility . For example: screen -S programm ./start programm - screen name. ./start - command to run in the screen. Return to the screen after reconnecting to the session, for example: screen -r programm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question