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.

6 Likes

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.
On https://blahblahblah.duckdns.org:8123/config/integrations
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 :
https://opfcaptcha-prod.s3.amazonaws.com/fb6ade5a500a4eb3bfe8c952390fe477.jpg?AWSAccessKeyId=AKIA5WBBRBBB76NAJF7L&Expires=1614967848&Signature=joe%2Fb%2FP6gkch1X8XoFmB2unN6jM%3D
showing

<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<Expires>2021-03-05T18:10:48Z</Expires>
<ServerTime>2021-03-07T18:35:05Z</ServerTime>
<RequestId>JVMJBJVXPMC6T185</RequestId>
<HostId>J6hTiixSYXTLUFYnI0WCAV9SAoJ7qbb9o/lYs/hupuFpi2P6fnTbLmhmuZ4rFAXuVnfGmm4rWEk=</HostId>
</Error>

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…

Use


alexa_media:
  accounts:
    - email: !secret amazon_user
      password: !secret amazon_password
      url: amazon.com

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)

2 Likes

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.

3 Likes

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 amazon.co.uk

@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
#alexa_media:
#  accounts:
#  - email: !secret amazon_user
#    password: !secret amazon_password
#    url: amazon.com
#    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.

4 Likes