Cant find a solution invalid client ID or redirect uri

Hi all,
hope anyone can help me with my issue.
I have a QNAP TS-269L and using qpkg installation for Home assistant (my QNAP did not support docker or container). I have tried serveral tips from the forum to get (again) push notifications to my cellphone. But lets start with the facts.

When I installed Home Assistant it was no Problem to get my Iphone 6 running the push notification. I got now a new Phone and try to login with the app. Now I get the Error Message: invalid client id or redirect uri.
The Cellphone from my wife is still getting the push notification. I have tried a lot of tips from the forum (deactivating IPv6, using IP address, etc.) nothing worked.
I use the Home Assistant just in my local network. From outside it is only reachable via VPN. Since I deactivated IPV6 on my QNAP the error message in the logs canged. First it was a timeout message, now it says:
OS error while lookint up redirect_uri Network is unrechable
followed by:
Login attempt or request with invalid authentication from 192...

Unfortunately I do not find the issue. When I use the browser on the NAS and type in I can see the IOS Page. So the NAS should have connetion.

Using the browser on the cellphone I can use Home Assistant, but of course I get no push notification.

At System Health I have the following datas:

arch: x86_64
dev: false
docker: false
hassio: false
os_name: Linux
python_version 3.6.0
timezone: Europe/Berlin
version: 0.99.3
virtualenv: false

mode: storage
resources: 0
views: 4

If somebody can help me it would be great!

Thanks in advanced.

First off, you’re using a semi-colon instead of a colon after https, so that’s never going to work.

Thanks for the hint. I just write off the message from my cellphone and typed a semi-colon instead of an double point. Sorry about that.

I figured out that it works when my iphone is not in the same wifi. so I tunred of wifi and used my LTE nerwork and I was able to connect.
before in the same wifi I got the same error. After the log in it is working in the same wifi

Hi deluxestyle, thanks for the hint. Unfortunately it did not work for me. When I turn off WiFi I still connect to my network via VPN. Then the iPhone is again in the network. How is your configuration? How do you get connection to Home Assistant from „outside“?

Ah. I‘m using duckdns to get a url for my instance.

Maybe, if you put the correct url, could works… (replace homeassistand for homeassistant)

@deluxestyle: I don’t have an DDNS on my System. I use it only internal and via VPN. But thanks I will try it.

@matisaul: I typed the error message from my cellphone. It was an mistake by me. The url was the right one. I will change it in my explanation. Thanks!

If it doesn’t work on your wifi could you try adding trusted networks to your config? This might alleviate your problem. Some routers and/or ISP’s do not allow reverse dns lookups (I hope I say it correctly) meaning you can not connect to your HA internal with an external url.

Hi jimz011,
That ist a good Idea. Since my Installation I have changed my ISP. Where do I have to add a trusted Network?

You can visit my repo and look for an example:

Please take not that this is the only config that has different indentation (it has a single space instead of two) no it is not wrong, it is exactly as the documentation was written at the time I made it and yes it should work (it does for me).

Thanks vor the example! I will try and give Feedback If IT works. Thanks!

I have tried now both ways described before (1. make Home assistand reachable from Internet and put the cellphone in LTE network, 2. Use trusted network).
Unfortunately nothing helped. Always get the same error message:
OS error while looking up redirect_uri Network is unreachable
When I make a ping to I get the IP back… Don’t know why the network should be unreachable…

I have now startet my IPV6 support on my QNAP like I had it when I first installed Home Assistant. When I now try to login I get the following error:
Timeout while looking up redirect_uri

When I use the new Home assistant app (beta 2.0) I get the following errors:
SSL error while looking up redirect_uri
and after that:
Timeout while looking up redirect_uri

If I can’t find a solution I have to use email nofification instead of push notification. This I don’t really like to do.

Now I got a step forward. Thanks to jimz011 I got now access to the old app. I have to turn on
Use legacy authentication = true
have made the changes with the
and typed in the password for my user.
Unfortunately I don’t get push messages. The state in the preferences show all IOS components with an x.

Have looked to the Logs and found a message. It seem I have to build a token?!? May anyone help me what I have to do now?

Log Details (WARNING)
Fri Oct 11 2019 12:08:29 GMT+0200 (Mitteleuropäische Sommerzeit)
api_password is going to deprecate. You need to use a bearer token to access /api/services/device_tracker/see from 192.

Got it now running, but not sure why it works…
Just if somebody have the same problem.
I turned on show advanced preferences and copied the URL to the internal URL. Then I got the checks in IOS components and everything is running.

invalid client id or redirect uri
May anyone explain how I can change to the new login method that the 2.0 App is working as well?

for me the only way to get rid of this problem was to install v1.1.1, I guess it has a different method for authenticating.

Anyone resolved this. Every other app I use works fine to authenticate with the ha server, including Wall Panel, Homehabit. But I just get

Logging in with Home Assistant Local.
Error: invalid client id or redirect uri

on all devices.

Its completely broken for me. I’ve fiddled with ipv6 on the host mac, tried multiple devices.

Anything else to try?
In all honestly I intend to stick with Homehabit, but I’m at a loss why I’m broken in this way and few if any others are.

Hi, same problem here.
Running latest stable on QNAP TS-253be and trying to login with IOS 12 and 13 device with Companion 2.0 app, but no success. Everytime I get the message “Error: invalid client id or redirect uri”.
Log in the GUI: “Login attempt or request with invalid authentication from”
Entry in the logfile:

2020-04-12 15:49:07 ERROR (MainThread) [homeassistant.components.auth.indieauth] Timeout while looking up redirect_uri
2020-04-12 15:49:07 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from

Can anyone help?

Best regards and stay healthy at home,

Solved (more ore less): When running in Docker, the option --net=host seems not to be working (maybe a routing issue on my NAS). Try other options, here bridge mode was working.