Not able to link Amazon Alexa Smart Home Skill anymore

I was using Amazon Alexa Smart Home Skill without problems but today I tried to add some new devices and relink the skill in my Alexa app without success.

After the login to HA from the alexa skill I am redirected to layla amazon url (because I am from Europe) but after the redirect it appears a new redirect to pitangui (which is the USA one) and then an screen of unable to link.

The flow is that one:

  1. https://mydomain/auth/login_flow/e8c0a0c6xxxx7920e38 (2FA) POST with status 200 OK where response contains:
    {"code":"262370","client_id":"https://layla.amazon.com/"}

  2. https://layla.amazon.com/api/skill/link/M3OxxxxxVX5Y?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&storeToken=true GET 302 Found from 3.164.162.237:443 where response header has:
    Location: https://skills-store.amazon.co.uk/api/skill/link/M3OxxxxxVX5Y?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D

  3. https://skills-store.amazon.co.uk/api/skill/link/M3OxxxxxVX5Y?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D GET 302 Found
    from 3.253.177.35:443 where response header has:
    https://layla.amazon.com/api/v1/accountLink/establish?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&vendor_id=M3OxxxxxVX5Y

  4. https://layla.amazon.com/api/v1/accountLink/establish?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&vendor_id=M3OxxxxxVX5Y GET 200 OK from 3.164.162.237:443

  5. https://layla.amazon.com/api/v1/accountLink/establish?code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&vendor_id=M3OxxxxxVX5Y with response POST 202 Accepted from 3.164.162.237:443 where response header has:
    Location: https://layla.amazon.com/api/v1/accountLink/establish?r=E&code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&t=C&showRedirect=1&vendor_id=M3OxxxxxVX5Y

  6. https://layla.amazon.com/api/v1/accountLink/establish?r=E&code=7fxxxxxxxcbf7e&state=AmaseyJ2xxxxxxxtM%3D&error=1&&showRedirect=1&vendor_id=M3OxxxxxVX5Y GET 200 OK from 3.164.162.237:443 where in the querystring says: error=1 and showRedirect = 1

here I get this screenshot:

If i check the html source of that page I see that the querystring r=E from the previous url means call to pitangui endpoint and not layla one.

after press the button I get in the loop of the attached video with these 2 request all the time where appears that error in the querystring redirectedFromAMASForcedDeeplink :

  1. https://pitangui.amazon.com/discover/link-account?r=E&code=7fxxxxxxxcbf7e&t=C&vendor_id=M3OxxxxxVX5Y&state=AmaseyJ2xxxxxxxtM%3D&t=C&vendor_id=M3OxxxxxVX5Y&error=redirectedFromAMASForcedDeeplink GET 200 OK where in the querystring says: error=redirectedFromAMASForcedDeeplink

  2. https://layla.amazon.com/api/v1/accountLink/establish?r=E&code=7fxxxxxxxcbf7e&t=C&vendor_id=M3OxxxxxVX5Y&state=AmaseyJ2xxxxxxxtM%3D&t=C&vendor_id=M3OxxxxxVX5Y&error=1&showRedirect=1 GET 200 OK where in the querystring says: error=1 and showRedirect=1 again

My lambada from AWS is placed in Ireland and my alexa developer account from Spain like my Amazon account which was also migrated some years ago.

I want to add that every 3-4 days I had logging failed attemps to my HA from AWS USA ips that I know that were related to that but I ignored because my Alexa skill was alawys working fine.

[homeassistant] 2025-03-31 08:01:44.685 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 72.21.217.139 (72.21.217.139). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-27 06:35:33.106 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 72.21.217.98 (72.21.217.98). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-23 10:56:06.647 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 54.239.98.30 (54.239.98.30). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-19 12:47:52.931 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 72.21.217.18 (72.21.217.18). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-15 11:33:52.312 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 72.21.217.143 (72.21.217.143). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-11 12:38:33.360 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 54.239.98.38 (54.239.98.38). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
	
[homeassistant] 2025-03-07 18:31:23.417 WARNING (MainThread) [homeassistant.components.http.ban] Login attempt or request with invalid authentication from 72.21.217.46 (72.21.217.46). Requested URL: '/auth/token'. (Apache-HttpClient/UNAVAILABLE (Java/1.8.0_432))
  • I am still waiting for a solution from Alexa Developer support.

Full reboot across the board. When you update the alexa yaml to add/remove devices, you don’t need to relink the skill, just restart HA. Reboot the host for HA (not a restart, a full-on reboot and if you’re using docker, reboot the host machine entirely) AND reboot your router/modem.

but that’s not the current problem. I cannot link it anymore, I also tried to remove all from AWS (lambda function) and the Alexa skill from developer portal. But it still happens with the new lambda function on Ireland region, the Alexa Skill in spanish language and using my Amazon account which is from Spain.

Finally solved. After migrating my old phone to my new one it worked. So, it was a problem with my Android and Alexa app. Removing cache and login again was not a solution, I never tried to reinstall the app but it was a problem from the device/app.

*one day after Alexa Developers said the same after 1 month and a half:

Hi,

Thanks for reporting back on this.
You can mark your own answer as a solution.

1 Like