Hello everyone, sorry for this request which is certainly due to a misconfiguration of the OwnTracks application.
I’m new to Gladys (installed on a mini-PC for at most 4 hours). After selecting the Gladys+ option, I installed OwnTracks on my phone following the information in Gladys’ help; the current version of OwnTracks is different from the one shown in the help. In Gladys there is no presence update on the map, but on the phone I get the message: « Error: HTTP code 401 » I checked the URL several times and it is correct with Gladys+. Many thanks in advance for the help.
Daniel Janssens
Hi @Janssens ![]()
Can you tell me more about the URL you entered in Owntracks?
Did you replace the URL with your Gladys Plus API key?
Thanks for your reply
Here is the URL pasted into Ownstracks (API address https://api.gladysgateway.com/v1/api/owntracks/ ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914
(The 16 x’s replace the 16 official characters)
Daniel
Can you take a screenshot of your application (masking your token if possible)?
Un grand merci pour tes interventions.
Désolé, de quelle application parles-tu ? OwnsTracks ou Gladys ? et quelle partie de celle-ci.
Ci-dessous le log de OwnsTracks modifié, si ça peut t’aider.
2024-05-27 14:40:27.062 D AppShortcutsImpl: Removing logViewer application shortcut
2024-05-27 14:40:27.130 I GeocoderProvider: Setting geocoding provider to Device
2024-05-27 14:40:27.314 I ServiceStarter$Impl: starting service
2024-05-27 14:40:27.335 D MapFragmentFactory: Instantiating Fragment for org.owntracks.android.ui.map.MapFragment
2024-05-27 14:40:27.341 D MapViewModel: setting view mode: VIEW_DEVICE
2024-05-27 14:40:27.342 E MapViewModel: no location available
2024-05-27 14:40:28.116 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.283 D BackgroundService: location update request params: LocationRequest(fastestInterval=null, smallestDisplacement=500.0, numUpdates=null, expirationDuration=null, priority=1, interval=900000, waitForAccurateLocation=null)
2024-05-27 14:40:28.285 D GMSLocationProviderClient: Requesting location updates priority=1, interval=900000 clientCallback=XXXXXXXXX
2024-05-27 14:40:28.286 D GMSLocationProviderClient: transformed location request is Request[PRIORITY_BALANCED_POWER_ACCURACY requested=900000ms fastest=150000ms smallestDisplacement=500.0m]
2024-05-27 14:40:28.288 D Scheduler: WorkManager queue task PERIODIC_TASK_SEND_LOCATION_PING as d209e134-8c1c-463a-9412-35ef50c6212b with interval 30 minutes
2024-05-27 14:40:28.290 D BackgroundService: loader thread:Looper (main, tid 2) {26d6899}, isMain:true
2024-05-27 14:40:28.292 D MessageProcessor: Initializing MessageProcessor
2024-05-27 14:40:28.293 D MessageProcessor: message:null,
2024-05-27 14:40:28.294 D MessageProcessor: Reloading outgoing message processor. ThreadID: Thread[main,5,main]
2024-05-27 14:40:28.297 D MessageProcessor: message:null,
2024-05-27 14:40:28.298 D MessageProcessor: Starting outbound message loop. ThreadID: Thread[backgroundDequeueThread,5,main]
2024-05-27 14:40:28.304 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:28.305 D BackgroundService: Background service bound
2024-05-27 14:40:28.306 D MessageProcessorEndpointHttp: creating new HTTP client instance
2024-05-27 14:40:28.313 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.315 D GoogleMapFragment: GoogleMapFragment initMap hasLocationCapability=true
2024-05-27 14:40:28.328 D zzl: location result received: LocationResult(lastLocation=Location[fused xx,xxx,x,xxxx0 hAcc=4 et=+31d2h51m48s387ms alt=221.0 vel=0.48778346 bear=210.67758 vAcc=5 sAcc=2 bAcc=45 {Bundle[mParcelledData.dataSize=392]}])
2024-05-27 14:40:28.331 E LocationProcessor: no location available
2024-05-27 14:40:28.345 D MapViewModel: setting view mode: VIEW_DEVICE
2024-05-27 14:40:28.346 E MapViewModel: no location available
2024-05-27 14:40:28.347 D GoogleMapFragment: Maps SDK initialized with renderer: LEGACY
2024-05-27 14:40:28.348 D GoogleMapFragment: GoogleMapFragment initMap hasLocationCapability=true
2024-05-27 14:40:28.548 D MapActivity$serviceConnection: Service connected to MapActivity
2024-05-27 14:40:28.550 D LocationLiveData: Removing previous locationupdate task complete. Success=true Cancelled=false
2024-05-27 14:40:28.552 D GMSLocationProviderClient: GMS Background location update request completed: Success=true Cancelled=false
2024-05-27 14:40:28.581 D DeviceGeocoder: Resolved 50.5561,4.9573 to Ruexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2024-05-27 14:40:28.583 D CachingGeocoder: Geocode cache: hits=0, misses=1
2024-05-27 14:40:28.596 D SendLocationPingWorker: SendLocationPingWorker started. ThreadID: Thread[androidx.work-1,5,main]
2024-05-27 14:40:28.614 D MessageProcessor: Queueing messageId:1716813628602-123b37, queueLength:257, ThreadID: Thread[androidx.work-1,5,main]
2024-05-27 14:40:28.631 D LocationLiveData: LocationLiveData location update request completed: Success=true Cancelled=false
2024-05-27 14:40:28.658 D LocationLiveData: Removing previous locationupdate task complete. Success=true Cancelled=false
2024-05-27 14:40:28.706 D LocationLiveData: LocationLiveData location update request completed: Success=true Cancelled=false
2024-05-27 14:40:29.503 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:40:29.506 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:40:29.508 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:29.512 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:29.534 I MessageProcessor: Waiting for 1 s before retrying
2024-05-27 14:40:30.542 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:30.741 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:40:30.763 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:40:30.780 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:30.802 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:30.818 I MessageProcessor: Waiting for 2 s before retrying
2024-05-27 14:40:32.824 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:33.049 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:40:33.053 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:40:33.056 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:33.062 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:33.090 I MessageProcessor: Waiting for 4 s before retrying
2024-05-27 14:40:37.096 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:37.291 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:40:37.294 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:40:37.299 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:37.307 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:37.326 I MessageProcessor: Waiting for 8 s before retrying
2024-05-27 14:40:39.071 I ServiceStarter$Impl: starting service
2024-05-27 14:40:39.540 D LocationLiveData: LocationLiveData removing location updates completed: Success=true Cancelled=false
2024-05-27 14:40:45.343 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:40:45.838 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:40:45.840 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:40:45.847 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:40:45.850 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:40:45.865 I MessageProcessor: Waiting for 16 s before retrying
2024-05-27 14:41:01.871 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:41:02.049 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:41:02.050 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:41:02.051 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:41:02.053 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:41:02.066 I MessageProcessor: Waiting for 32 s before retrying
2024-05-27 14:41:34.078 D MessageProcessorEndpointHttp: url:https://api.gladysgateway.com/v1/api/owntracks/%20ea6d38a975dfa4eb801e14e83c4f6ff895de05xxxxxxxxxxxxxxxxa0a35900927059f5f687ddd914, messageId:1716813626029-b78622
2024-05-27 14:41:34.308 E MessageProcessorEndpointHttp: java.lang.Exception: HTTP request failed. Status: 401
at org.owntracks.android.services.MessageProcessorEndpointHttp.sendMessage(SourceFile:528)
at org.owntracks.android.services.MessageProcessor.lambda$sendAvailableMessages$0(Unknown Source:2)
at org.owntracks.android.services.MessageProcessor.$r8$lambda$bVYaIhYhXtJCzBaSxWOGtcUu6f8(Unknown Source:0)
at org.owntracks.android.services.MessageProcessor$$ExternalSyntheticLambda1.call(Unknown Source:4)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
2024-05-27 14:41:34.312 D MessageProcessor: message:HTTP code 401,
2024-05-27 14:41:34.318 E MessageProcessor: Message delivery failed. queueLength: 259, messageId: 1716813626029-b78622
2024-05-27 14:41:34.321 W MessageProcessor: Error sending message. Re-queueing
2024-05-27 14:41:34.334 I MessageProcessor: Waiting for 64 s before retrying
I was talking about Owntracks, the configuration part of it ![]()
Which mode do you have in « Connection »? (The iOS app is different)
You normally don’t need to provide a username and password.
In Mode → Private HTTP (checked)
In Identification:
Username → Fer…be
Password → xxx
Device ID → Android
Tracker ID → empty
What are the other options?
You should not use this authentication, the API key is in the URL ![]()
I just deleted this information, but there’s no significant change — still the message: Error: HTTP code 401 and nothing in Gladys.
I’ll restart the phone and get back to you.
@Janssens Are you sure you copied and pasted the API key correctly?
When I look at your post on the forum, there is a « % » before the API key, that’s not normal, I think you must have put a space before your API key
A very, very big thank
Thank you for your message and for your support, it’s always a pleasure to read ![]()
For Enedis I went to check on the Gladys plus side and there is a synchronization error because apparently Enedis says that the consent hasn’t been given on your side.
Can you try to synchronize your account again? The Enedis website is sometimes capricious, it may not have worked on the first try.
Thank you,
I have just restarted the synchronization and, like Sister Anne, I’ll wait.
Have a good evening
Daniel
2 messages were split into a new topic: OwnTracks configuration for 2 users





