аватар question@mail.ru · 01.01.1970 03:00

How to see who and what wrote in the chat bot Telegram? Getupdates only gives {"OK": True, "Result": []}

Why the method:

  https://api.telegram.org/botxxxxxxxxx/getupdes  

gives out Only:

  {: true,  "" result "" : []}  

?

the messages of the bot were sent to them and he reacted to them. DATA-HIGHLIGHTED = ""> {: true, : { "update_id" ": 8393 , : { "" Message_id "" : 3 , "from" from "" : { "" id "" : 7474 , "" first_name "" "" AAA "" }, : { "" ID "" : : "" "" }, : 25497 , " "New_chat_participant" ": { "" id ": 71 , " first_name "" : "name" ", "useame" ": " "yur_bot_name" "}}}

аватар answer@mail.ru · 01.01.1970 03:00

This method retus only new messages. If the bot has already reacted to some messages sent to him, then he already received them (most likely in the same method) and they are marked with Telegram server as received. Accordingly, with each new request, they will no longer retu, otherwise you would receive the entire history of messages from the moment the bot each time. In this case, you have two options:

  • to conduct the log of the messages received by the bot and use it at your discretion.
  • Play the offseet method getupdates . Read more here:

for example: https://api.telegram.org/botxxxxxxxxx/getupdates?

Latest

Similar