Your configuration is incorrect.
Please, can you indicate me whats the correct?
I was looking in github for the code here and put:
<entry key='notificator.types'>web,mail,telegram</entry>
<entry key='notificator.telegram.key'>BotApiKey</entry>
<entry key='notificator.Telegram.chatid'>ChatId</entry>
with the same result.
Thanks
Looks correct. We would need to rename the keys though. The case is all mixed up.
OK, and there is anything I can do to trace it and see the cause of it isn't working?
I would recommend to debug the code and see what happens with the request.
@GoNzCiD you should first of all make sure the below request works. Keep in mind, that the chat_id is negative (with a "-" in front) for groups in telegram.
$ curl -s -X POST https://api.telegram.org/bot<TOKEN>/sendMessage -d chat_id=<CHAT_ID> -d text="Hello World"
If this works, there is no reason why it shouldn't work with traccar. Most people are facing problems finding the proper chat_id.
Hello, I was able to run the telegram notifications but I only get the notifications !! How can I add the user to receive notifications of his vehicle via Telegram ??
Hello!!
Can you recommend any bot to use (under win7)??? Simple and beautiful jaja
Greetings and thanks in advance!!
@Han Wer, thanks a lot.
I have tested it and it doesn't work :(, I have tryed with another bot I wich it's key has less special characters in traccar and it works... I'm going to recreate the bot api key!
@Anton Tananaev, maybe traccar log error message should contain the error description additional to request status code, and it helps to identify the problem.
@GoNzCiD, how did you recreate the bot with less special characters? Maybe it be my traccar server problem.
works for me: curl -s -X POST https://api.telegram.org/bot<TOKEN>/sendMessage -d chat_id=<API_CHAT_ID> -d text="Hello World"
works for me: https://api.telegram.org/bot<MY_TOKEN>/sendMessage?chat_id=<API_CHAT_ID>&text="Hello World"
Regards
JB
I don't know if it was the real reason, but I only request botfather to regenerate the api key.
Try to start a chat from your chat to the bot and then send the message again via api
@GoNzCiD, maybe it is not the problem. I recreated the bot api key (same standard format - ex: 123456:AAG-Nh2FrLJ6gktlOPPQ5VJ3MmSTuDC6x_8
) and did not work on traccar. return WARN: Telegram API error - HTTP 400 Bad Request - BadRequestException (...)
. any clue ?
JB
Is the phone nomber on the user setting contining the cuntry code?
@shyy, I already tried using with (+55) and without. Same error on traccar. using "http://...". or "curl -s -X ...." works fine.
JB
Hi, I have installed new 4.4 with telegram notifications.
Configuration are:
<entry key='notificator.types'>web,mail,telegram</entry> <entry key='notificator.Telegram.apikey'>BotApiKey</entry> <entry key='notificator.Telegram.chatid'>ChatId</entry>
Both keys (bot and chat) are valid and tested. I have test it on HA notificator and works.
Once I have set an alarm in the UI and assig a telegram notification, web and mail I trigger a SOS alarm since device:
What can I test?