Alexa Media Player - 2 Factor - Verification Code not received


    - email: !secret amazon_user
      password: !secret amazon_password

in your config, then you only have to enter the via SMS authentification code from amazon (maybe you got to activate it in your Amazon settings)


Mine broke. Can’t get it to work. Capcha is blank most of the time. I tried the OTP - Code the return code put it in on Amazon and it was approved. Then checked the box and hit submit in Home Assistant Integration and it said unknown error. Really doesn’t seem like it should be this hard?

I had been having trouble today… I use the proxy method but it wouldn’t come up… switched to chrome browser and it worked the first time. Are you using chrome or safari ?

I did chrome in an incognito window!

I love you my friend! :-))
After changing my password, I also desperately tried to get Alexa to work.
Only your entry in Config.yaml and a restart helped!
No more captcha but only the query for the Amazon 2FA. This SMS was there faster than HA had restarted.
Afterwards a HA restart was necessary but now it is running again :slight_smile:
Thank you!
Date: 2021-12-13

I did exactly that.
And no matter how often I type in the code (I use google authenticator) it always tells me its invalid.

Any tips?

Hi, I am came across this thread when searching for answers, and found out how to keep the Alexa integration logged in, so thought I would share in case it helps others that landed on this.

For the field that is labelled:

You can enter in the seed key so that HA can generate the 2FA code for you. Amazon doesnt provide this directly so if you save your 2FA QR code (this can only be obtained during 2FA setup) to your PC then upload it to this site. It will then extract the seed, which you can paste in this field, meaning you wont need to authenticate again.

Just make sure you copy everything after ‘secret=’ and before the ‘&’

This worked out great for me, it then shows you the generated key that should match you authenticator app.


Hi all I’m having problems with my alexa intergration
After alot of playing around it worked. But a few weeks later it wants to reauthenticate, now I’m not getting anywhere. I vaguely remember 2 lines about 2pa. But on the is page

There is only one line, even after deleting the alexa intergration and reinstating it. Even more annoying is that some of the fields are already filled in.

I was hoping to start from the very beginning, but it would seam there are some files hanging about that is preventing me from starting afresh.

Can anyone help me please

Here is my configuration.

In my case, I use Duck DNS and need to add a s myself in the https
(it’s not there by default which can play a trick on you if you don’t pay attentionl !)

mine looks the same as yours but in missing the bottom 2 check box.
when i first set up the media player they were there. any idea how i can get those options back.
i use duckdns too
and put the large code supplied from

@peter-sounthararajah @JeromeO
If you have not solved… I recommend trying this. (Apparently, there was a Breaking Change in one of the updates. I could not find it, but followed directions from someone else. Most important (And Missed) is to remove the chunk from your configuration.yaml

#Alexa Media Player
#  accounts:
#  - email: !secret amazon_user
#    password: !secret amazon_password
#    url:
#    debug: true

also remove the current (broken) integration. restart HA.
go back to Settings → Devices & Services→ Integrations select [+Add Integration] and search for [Alexa Media Player].
In the form, fill in the fields: Email Address, Password: URL to access Home Assistant, Built-in 2FA App Key.
→→→ **Where to get the proper Built-in 2FA App Key:
in another tab, Log into Amazon, Select tab [↓ Account & Lists] → Your Account, select [Login& Security] → Two-Step Verification (2SV) Settings [Edit], Authenticator App select [Add new app], Select [Can’t scan the barcode?] Copy the key used for HA Built-in 2FA App Key
When this is submitted, open and activate that S2V and add the 6 digit code to complete activation.

The directions provide is a collaboration effort used to fix my 2 week effort.
Yes, there are many variations, but the setup is beyond picky. Hopefully it can be used for others that missed the change details from the update that disconnected everyone.

1 Like