Telegram API error - HTTP 404 Not Found

Zero482 years ago

Hello,
I was able to run Telegram Test from ANY particular user account . I followed this post https://www.traccar.org/forums/topic/doubts-with-telegram/ Specifically Marcelo Rangel directions, except that I added "Telegram" to this line

<entry key='notificator.types'>web,mail,telegram,sms</entry>

in the traccar.xml .
I think I followed the directions :
added Telegram's ID at user account phone.
I enabled "notificatorTelegram" at "Notifications" and als at device Notifications.
Test works as expected and I receive the "Test Message" in the User phone.
However not the , for instance "Power Cut"
at Logs I just receive

Telegram API error - HTTP 404 Not Found - NotFoundException (...)

Any advise or similar situation?

Cristian2 years ago

consultation, which configuration did you apply? Telegram? or Telegram as SMS?

Cristian2 years ago

I used that configuration in Traccar 5.1 and it works for me.
the only thing I have to do is to enter the user's telegram chatid in the cell phone number field.

<!-- Tipos de notificaciones -->
   <entry key='notificator.types'>web,mail,sms</entry>

   <!-- SMS with TELEGRAM -->
   <entry key='notificator.sms.manager.class'>org.traccar.sms.HttpSmsClient</entry>
   <entry key='sms.http.url'>https://api.telegram.org/botXXXXXXX:XXXXXXXXXXXXXXXXXXXXX/sendMessage?</entry>
   <entry key='sms.http.user'>[YOUR ACCOUNT SID]</entry>
   <entry key='sms.http.password'>[YOUR AUTH TOKEN]</entry>
   <entry key='sms.http.template'>
        chat_id={phone}&amp;text={message}
   </entry>
Zero482 years ago

Hello,
Sorry for late reply.
Same except that I added telegram here (once I did it appeas as notificator)

<entry key='notificator.types'>web,mail,telegram,sms</entry>

The test message works as expected in the user account , but notifications are not sent ... I just get this message at logs:

Telegram API error - HTTP 404 Not Found

Wondering where is my mistake
I did enabled notifications at account menu as well at Unit involved in the account . Which was I understood from my forum readings .

Thanks for your input , any suggestion ?

Anton Tananaev2 years ago

If you're using it as SMS, you can't add "telegram" to the notificators. That's definitely a mistake.

Zero482 years ago

ok , So if I'm using it as notificator (not SMS) then I must use this format

<entry key='notificator.types'>web,mail,telegram</entry>
<entry key='notificator.telegram.chatId'>-888398996</entry>
<entry key='notificator.telegram.key'>765112785:AAHoRzesUk5f4YCBjtz0U88X2XVcTCBG1b8</entry>

right?

Thanks in advance

Anton Tananaev2 years ago

Yes, something like that.