learn icon indicating copy to clipboard operation
learn copied to clipboard

[Feedback]: Telegram Notification

Open JZ-SmartThings opened this issue 1 year ago • 2 comments
trafficstars

Doc Page link

https://learn.netdata.cloud/docs/alerts-&-notifications/notifications/agent-dispatched-notifications/telegram

Description

Please remove the minus sign from the Chat ID numbers. It didn't work at all for me with HTTP 400 error until I just removed the minus sign. Then it worked flawlessly. Thank you!

JZ-SmartThings avatar Mar 09 '24 08:03 JZ-SmartThings

Hey @JZ-SmartThings what type of chat you got? In our docs it mentions Group IDs start with a hyphen, supergroup IDs start with -100

Ancairon avatar Mar 11 '24 11:03 Ancairon

In the BotFather I just did /newbot then joined it, then wrote an initial message so that it shows up at this URL:

https://api.telegram.org/botXXX:YYY/getUpdates

After getting that, it's just a number without any dashes. It would be the chat.id field of the json. Once I took out the dash which I obviously saw in your instructions, it finally worked. With a dash it did not, said couldn't find chat ID.

Thanks!

UPDATE: it's this field that is documented: DEFAULT_RECIPIENT_TELEGRAM="-49999333876"

This page shows a good example: https://stackoverflow.com/questions/32423837/telegram-bot-how-to-get-a-group-chat-id

JZ-SmartThings avatar Mar 12 '24 01:03 JZ-SmartThings