telegram notification

You k2 years ago

Hello,

I've generated a new telegram bot with a chat id and added those elements to my config file

<entry key='notificator.types'>web,mail,firebase,telegram</entry>
<entry key='notificator.Telegram.key'>906087541:AAFKNkmFgJsndE4iplHOxMLgeXO4RWZOmzg</entry>
<entry key='notificator.Telegram.chatId'>-946642798</entry>

I've also added a user attribute with chat id 946642798 to my admin account
i've also added a new alert for status and i selected all channels, i can see notification via web and email but not via telegram
when i tested my token i got this

root@xxxxxx:/opt/traccar/conf# curl -s -X POST https://api.telegram.org/bot906087541:AAFKNkmFgJsndE4iplHOxMLgeXO4RWZOmz/sendMessage -d chat_id=-946642798 -d text="Testing 1 2 3"
{"ok":false,"error_code":401,"description":"Unauthorized"} 

please any insight ?

Anton Tananaev2 years ago

At the very least your config keys are wrong. Please check the documentation.

You k2 years ago

please provide link to documentation related to telegram notif

Anton Tananaev2 years ago

It's the first link if you just search "telegram" on the website. Have you tried searching first before asking for help?

You k2 years ago

Yes i've already followed the official doc and got the correct chat_id but the issue still persist

root@xxxx:/opt/traccar/conf# curl -s -X POST https://api.telegram.org/bot906087541:AAFKNkmFgJsndE4iplHOxMLgeXO4RWZOmz/sendMessage?chat_id=-898470782&text="Hello World"
{"ok":false,"error_code":401,"description":"Unauthorized"}
Anton Tananaev2 years ago

If you already followed it, why is your config invalid and doesn't match the documentation?

You k2 years ago

Now it works, lowercase letter... thanks

Richard Acosta2 years ago

Can you clearify what went wrong?
It has been working fine for me for at least one yar but from some time on, some notifications stopped working and now is directly no telegram notifications at all.

Richard Acosta2 years ago

Just restarted server, something was bonkers...