Question 5.2

Jérôme2 years ago

Hello, I have several questions following migration 5.2.

  1. API authentication by token - now token can be used directly for all API calls => Possible to have example for http://server:8082/api/positions

  2. Service administrator account - you can specify an administrator token in the configuration file; this can be used for example to recover lost administrator access => Possible to know how to do this?

  3. Support email name: you can now specify a friendly name for email notifications => Possible how to do this?

And finally since version 5.2 my push notifications no longer work:

Connection refused (Connection refused) - ConnectException (... < NotificatorTraccar:77 < NotificationResource:97 < ...)

=> Possible to get help?

Thanks in advance.

JaNO2 years ago

Hello
I have the same problem with the traccar notification

(Connection refused) - ConnectException (... <NotificatorTraccar: 77 <NotificationResource: 97 <...) => Possible to get help?
Abazer Mahgoub2 years ago

I have same problem too

(Connection refused) - ConnectException (... <NotificatorTraccar: 77 <NotificationResource: 97 <...)

=> Possible to get help?

Abazer Mahgoub2 years ago

And when I use Arabic, I can't set a custom date for restarting or for reports

Text 'null' could not be parsed at index 0 - DateTimeParseException (... < DateUtil:63 < DateParameterConverterProvider:32 < *:28 < ...)
When i using english have no problem
Anton Tananaev2 years ago

Please try this JAR file. It should fix the push notifications:

https://www.dropbox.com/t/cbB4fIOUIHNXdydW

Jérôme2 years ago

It's OK with the new file. Thanks

Could you give me some feedback on my other questions please?

Anton Tananaev2 years ago
  1. Don't have an example, but you use token with Authorization header as Bearer token. It's pretty standard.
Authorization: Bearer YOUR_TOKEN
  1. Something like this:
<entry key='web.serviceAccountToken'>SECRET_TOKEN</entry>
  1. Support email name: you can now specify a friendly name for email notifications => Possible how to do this?
<entry key='mail.smtp.fromName'>Traccar</entry>
Castillo2 years ago

Hello Anton, I still have the issue with notification on v5.2 and official iOS app
I checked the API Key in Account information and configuration in traccar.xml

    <entry key='notificator.types'>web,traccar,mail</entry>
    <entry key='notificator.traccar.key'>eyJkYXRhIjoxMjEyNX0...........................................</entry>
  
    <entry key='mail.smtp.host'>smtp.gmail.com</entry>
    <entry key='mail.smtp.port'>465</entry>
    <entry key='mail.smtp.ssl.enable'>true</entry>
    <entry key='mail.smtp.from'>SECRET@gmail.com</entry>
    <entry key='mail.smtp.auth'>true</entry>
    <entry key='mail.smtp.username'>SECRET@gmail.com</entry>
    <entry key='mail.smtp.password'>SECRET</entry>
    <entry key='mail.smtp.fromName'>Traccar</entry>

I deleted 'mail' notificator, but I still having this issue and do not receiving notifications

Connection refused (Connection refused) - ConnectException (... < NotificatorTraccar:77 < NotificationResource:87 < ...)
Anton Tananaev2 years ago

It probably means that you haven't updated the JAR file.

Castillo2 years ago

(I can not edit my message)
If enable 'mail' notificator it show this error, so y disabled it, I do not want at this moment:

534-5.7.9 Application-specific password required. Learn more at
534 5.7.9  https://support.google.com/mail/?p=InvalidSecondFactor bw3-20020a0560001f8300b0021d70a871cbsm13888236wrb.32 - gsmtp
 - AuthenticationFailedException (... < MailManager:153 < *:99 < NotificatorMail:44 < NotificationResource:87 < ...)`
Anton Tananaev2 years ago

That's completely unrelated to Traccar. You just misconfigured the email.

Castillo2 years ago

Sorry for not understanding earlier the JAR file patch message. After update the JAR file, official Traccar notificator works again.

Thanks Anton!!

pagi2 years ago

hello, I have simmilar problem but with emal notifications;

2022-07-21 16:42:24  INFO: [Td27ca517] error - NullPointerException (... < MailManager:74 < *:107 < *:99 < NotificatorMail:44 < NotificationManager:104 < ...)

It previoulsy work on 5.0 but after upgrade to 5.2 without configuration changes it not working.

Anton Tananaev2 years ago

You should create a separate thread instead of piling up all the different issues here. Also provide your config.