Alexa Media Player - 2 Factor - Verification Code not received

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.


hate to necro a thread… but I’m having these authentication issues with this integration and it is killing me!.

I get the “Unknown Error” message or “User input malformed: extra keys not allowed @ data[‘email’]” if I try to resubmit the integration configuration screen.

Have tried removing the integration from HACS and restarting, re-installed it and restarted… same results every time. Seems like there is definitely something quirky with this integration for this many people to have issues/comments on it.

I used it primarily as a way to play HA based alerts… hoping there is a better way to do this that offers less brain damage?

the “Click” for Advanced Debugging also does nothing in the home-assistant.log, unsure if this is logging somewhere else?

Trying to follow this vid on how to configure… I never get the confirmation code after cut-n-pasting the 2FA string from amazon’s site.

UPDATE: FINALLY!!! FINALLY!!!.. FINALLY! Got this working again.
And it was something not mentioned in this thread. My External and Internal URLs were configured to the same address
External URL: (using nginxproxymanager addon)
Internal URL: (whatever my HASSIO local IP:PORT is)

…after restarting, I had to change the URL for my HA from the External URL to the Internal URL, then I was able to get the confirmation OTP screen to work. All other steps mentioned in here worked fine, but in my case, it would not budge until I got the Internal URL corrected.

Hopefully this helps someone else as I lost some brain cells on this one…

1 Like

Thank you, THIS is why this integration has been whinging about 2fa codes for so long. That I’ve repeatedly added authenticator apps to Amazon’s two factor verification page for no reason is quite frustrating. I’m lost as to why THIS detail isn’t included in the installation/config WIKI.