Alexa Media Player - 2 Factor - Verification Code not received

I keep getting " Invalid Built-In 2FA key". It’s unclear to me what the Built-In 2FA key is supposed to be even. What is this? I agree, the integration experience sucks. Even when you get it working it’s only ever for a few days. Not something you can rely on.


same problem here… nothing appears to work for me.

I finally figured out how to get this working. I’m using HA OS and had my internal url set to “http://homeassistant.local:8123” which appears to be unresolvable for the integration. Instead, I used “http://ip_address:8123” where “ip_address” is your internal IP address and then the wizard for the proxy configuration actually WORKED and I was able to complete setup.

No luck here. Auth to this integration has been a circle-jerk for its entire life. I find it useful, but it never god damn stays working. Oh wait… did I just get one of those, “Failure. Success!” type messages? Did it just auth after about 25 tries? Its like that every time with this thing.

1 Like

I’ve just lost connection to the Alexa Media Player integration.
I am presented with this screen but the captcha image is broken so I cannot type its content below
(I do have my 2FA code that I had kept)

If I click the broken captcha image, I am redirected to :

<Message>Request has expired</Message>

I’m not sure where to go from here :frowning:

1 Like

Also stuck in the same place as however i found that entering an incorrect value for the captcha generates a second one that can be seen. I can then use this with the 2FA to sign in again… For approximately 15 seconds before it fails again and i am back to the start.
Looks like something may have changed at Amazon’s end?

It’s being discussed here but no clear solution yet

Same exact problem here. Its almost not worth the hassle for this to work. every few days it expires and were all right back here searching for answers.

1 Like

After a couple of tries this time, I took your approach and it works - for now. Let’s see how long this time…


    - 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.