Push Notification API key changed. Updated traccar.xml, but Push Notification still not working.

C5roki 22 hours ago

I use push notifications on my Traccar Manager app. It worked fine, but now I don't get any notifications anymore.

I noticed that my Push Notification API key (from my account at www.traccar.org) had changed.
Weird, but ok, I updated the traccar.xml, restarted Traccar, but still no notifications in the app.
Test notifications work well on 'web', 'email', 'telegram', but not on 'push notification'.

Any idea what is causing the push notifications not to get through to my app?

Anton Tananaev 19 hours ago

What do you get if you test push notifications channel?

C5roki 15 hours ago

Nothing, actually.
I have a notification configured for 'web' and 'push notification' and when I click 'TEST CHANNELS', I get a pop-up 'test' right away in the browser, but nothing in the app (also no warning or error in the log file).
('email' and 'telegram' work fine, immediately after clicking 'TEST CHANNELS' I got 'test' in my mailbox and Telegram.)

Anton Tananaev 15 hours ago

OK, here are the things to check:

  1. Test only the push without other channels.
  2. Look at the API call to see the actual result.
  3. Check if the user has a valid token.
  4. Try clearing the token and re-logging in.
  5. Check server logs for warnings and errors when you expect push.
C5roki 13 hours ago

(Running Traccar 6.16.0 in a Docker container)

  • Created notification for 'push notification' only.
  • Copied 'Push Notification API key' from my traccar.org account to traccar.xml
  • Set logger.level to fine in traccar.xml
  • Restarted Traccar
  • Logged in again
  • Clicked 'TEST CHANNELS' in the notification
  • Inspected log
...
2026-10-22 20:19:06 DEBUG: onRequest POST{u=http://192.168.2.230:8086/api/notifications/test/traccar,HTTP/1.1,h=12,cl=133,p=null} oejsi.HttpChannelState@50c988a4[:handling=null,handled=false,send=SENDING,completed=false,request=null]
2026-10-22 20:19:06 DEBUG: HEADER --> CONTENT
2026-10-22 20:19:06 DEBUG: parsed true oejh.HttpParser{s=CONTENT,0 of 133} oeji.ArrayByteBufferPool$PooledBuffer@16735913[133/8192,d=true,rc=1] oejsi.HttpConnection@5eadcc43::oeji.SocketChannelEndPoint@683071b[{l=/172.140.0.2:8082,r=/192.168.2.191:50443,OPEN,fill=-,flush=-,to=11/30000}{:io=0/0,kio=0,kro=1}]->[oejsi.HttpConnection@5eadcc43[p=oejh.HttpParser{s=CONTENT,0 of 133},g=oejh.HttpGenerator@4e6cf5ad{s=START}]=>oejsi.HttpChannelState@50c988a4[:handling=null,handled=false,send=SENDING,completed=false,request=POST@71abb905 http://192.168.2.230:8086/api/notifications/test/traccar HTTP/1.1]]
2026-10-22 20:19:06 DEBUG: HANDLE POST@71abb905 http://192.168.2.230:8086/api/notifications/test/traccar HTTP/1.1 oejsi.HttpConnection@5eadcc43::oeji.SocketChannelEndPoint@683071b[{l=/172.140.0.2:8082,r=/192.168.2.191:50443,OPEN,fill=-,flush=-,to=12/30000}{:io=0/0,kio=0,kro=1}]->[oejsi.HttpConnection@5eadcc43[p=oejh.HttpParser{s=CONTENT,0 of 133},g=oejh.HttpGenerator@4e6cf5ad{s=START}]=>oejsi.HttpChannelState@50c988a4[:handling=null,handled=false,send=SENDING,completed=false,request=POST@71abb905 http://192.168.2.230:8086/api/notifications/test/traccar HTTP/1.1]]
...

(I wanted to put more in this message, but I keep getting 'forbidden' when I make it longer. The log goes on and on, see a couple of times the same kind of lines.)

Did the test again with 'email', just to see if it was not internet connection or something like that. Worked fine.

Anton Tananaev 13 hours ago

I think you're mixing up API key and device token.

C5roki 13 hours ago

At https://www.traccar.org/my-account/

My Account
Push notifications API key:

eyJk_very_long_and_kind_of_random_string_about_an_arm_long_DJCbE1N

That is the one I copied in the <entry key='notificator.traccar.key'> in traccar.xml (and I set <entry key='notificator.types'>web,mail,traccar</entry>)

Anton Tananaev 13 hours ago

That's API key. I am talking about device tokens, which is a completely different thing.

C5roki 12 hours ago

Ok, help me out. Where do I find the device tokens?

I followed (long time ago) the https://www.traccar.org/notifications/ instructions under 'Push Configuration'

Push notifications are sent through the Firebase platform. There are two options for push notifications in Traccar:

Traccar notifications to the official Traccar Manager apps
Direct Firebase notifications to your own mobile app
To receive notifications to the official Traccar Manager app from Google Play, all you need to do is configure Traccar with the following parameters:

<entry key='notificator.types'>traccar,...</entry>
<entry key='notificator.traccar.key'>TRACCAR_KEY</entry>
You can find your personal API key on the Account page. You need to be registered on the website.

I can't find any reference to the device token(s), so I have no clue where to look for them.

Anton Tananaev 12 hours ago

Device notification tokens are in your user attributes. They're added automatically, so it's not something you need to configure typically. But it is important for this troubleshooting.

C5roki 12 hours ago

Now that you mention it, I have seen these 'weird' tokens before (in previous versions of Traccar), but at the moment I do not have an attribute with a token (I can add 'notification tokens', but it is empty and stays empty).

Is there a table I can check for the device tokens?

Anton Tananaev 11 hours ago

Again, it's in user attributes. If you don't see it, it means there's probably some issue with the app.

C5roki 11 hours ago

Found it.

  • In the Traccar Manager app logged out, logged in.
  • In the user attributes there is a 'notification tokens' attribute.

But clearing it, getting a new token, still the push notification doesn't work in the app.

C5roki 11 hours ago

And ... it works.

  • I cleared the 'notification tokens' in the user's attributes
  • Logged out of the Traccar Manager app
  • Logged in as the same user in the Traccar Manager app
  • Checked the 'notification tokens' in the user's attributes
  • Tested the notification with the same user (I tested with another admin user, not linked to the Manager app)

Lessons learned:

  • Check if your Push Notification API key is up-to-date (in my case it changed and that caused the failing push notifications in the first place)
  • the very same user need to be
    • logged in to the Traccar Manager app
    • connected to the notification with 'push notification' set
    • used when testing the notification

(Thanks Anton for being patient with me.)

Anton Tananaev 11 hours ago

API key is completely unrelated. It did change, but both old and new are valid.

Sounds like the only issue was that you were using wrong user?