Message "Login attempt failed"

I got this message in my Home Assistant UI a few times a day:
Login attempt failed: login attempt or request with invalid authentication from

I think its the IP from the local API. But what can cause this problem?

Thx for helping

1 Like

if your normal IP addresses follow the format 172.30.x.x then it’s local.
If they don’t follow this but tend to follow the default 192.168.x.xm then someone has found your HA server and is trying to log in.
Set up ip_ban_enabled at the very least. you may also want to review your security setup

I have the exact same message.

Thanks for reply.
My Local IP is 192.168.x.x
But 172.30.x.x Is also a local address range. So I dont think its “someone how found my HA”.

I upgraded today to HassOS on Raspberry Pi 3.
Before I was running the old Hass.IO image. There I got the same message but with a little different IP:

So I think the problem cause by an addon using the local API

172 is the docker container - not a hack


but what cause this issue??

are you using the new auth? Is legacy_api enabled? If the addon is using a legacy api with legacy not enabled it will cause it.

I was more commenting on the hysteria that you have been hacked.

YI think I’m not using the new auth system. This are my http settings. I read the developer Blog. Do I have to enable the new auth system If I’m using I dont get it

      api_password: !secret api_password
    ##  ssl_certificate: '/ssl/cert.pem'
    ##  ssl_certificate: '/ssl/fullchain.pem'
    ##  ssl_key: '/ssl/privkey.pem'
      ip_ban_enabled: True
      login_attempts_threshold: 5

I’m not afraid of been hacked. This Message in the UI is just very annoying!


add to trusted networks

You will be forced in 0.77 to use new auth I believe


Seems to work. Thanks a lot

1 Like

But it must be or

You’re right. /16

can you please explain how/where to set this trusted network.
I’ve tried the following with no luck
in my configuration.yaml

under Http:
use_x_forwarded_for: True

I first tried just the trusted network and that didn’t work so I tried trusted proxies…still getting
Login attempt failed: login attempt or request with invalid authentication from

i got this problem after update too .when i use google assistan (iftt=> Webhook)
i can’t set trust network like that coz i use mobile data net work it random IP.
Please help i saw it need to authentication in .ymal file but i can’t found it ( forgot what it is sth like longlife …)

After login into Hass click on your user icon. On the very bottom of the page you can create so called Long Live Token access. There is also a link, where you can find more info how to enable access…
But in your scenario I guess that its not your cell phone actually doing access?!

1 Like

i’ll test it out.
about phone access for controlling homeassistant like Light,door,and more.
before version 0.77sth, it’s work fine ( i use IFTT => google assistant=>Webhook ) Webhook need " ("

I’ve got like the same issue with the login attempt failed error.
I’ve logged in with the “new” authentication on the app, but also filled in the legacy API password in the settings.
Everything seems to work just fine untill I sent a notification to my phone with actionable items.
As soon as I press one of the defined actions, I get a “login attempt failed” and the action does not get executed.

I have the same issue
there is also a bug open on github. but it seems no one looks into it

Are you guys using the iOS beta app?

I tried it also with the beta app. was still not working