Not able to get telegram group chat_id param

Viewed 10

My goal is to send messages to a specific telegram group using a telegram bot. So, I created a telegram bot and I added itself to the telegram group in order to retrieve the chat_id param. However I am not able to get the chat_id, calling the getUpdates API, I always get:

ok  true
result  []

Here the steps I did to try to get the chat_id:

  1. I Created a new bot via botFather.
  2. I Created a new telegram group and added the bot.
  3. I used the getMe API to see that everything was good with the bot.
  4. I disabled for privacy the bot (suggested in several forum).
  5. To extract the chat_id, I used the getUpdates method. I did a GET with this URL https://api.telegram.org/botTOKEN/getUpdates (where TOKEN is substitute with what I got from botFather)
  6. I continued with the step 5, while writing random messages on the telegram group and also calling the bot with /start.

There are no coding tasks till now, I have just been using the telegram app. Not able to get the chat_id; hope you can help me, thanks in advance.

0 Answers
Related