Alexa Media Player - 2 Factor - Verification Code not received

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)

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

5 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

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: https://myha.location.com (using nginxproxymanager addon)
Internal URL: http://192.168.0.1:8123 (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.

Exactly this worked for me! Thanks, @007DJ :+1:

I recognize this is a super old thread, but Iā€™m having an issue and wanted to check the community. I get through all the steps and confirm with the OTP. When the new webpage opens for Amazon, I enter my username and password but nothing happens. It just goes right back to the username page again.

Anybody else with the same? Any thoughts?

1 Like

The problem is the new three page login sequence with email, then password, then 2SV.
AMP was programmed to do the callback after two pages (the way the Amazon login used to be) but gets an ā€œunsuccessfulā€ response after only two pages since the login sequence did not finish all three pages and AMP returns you to the previous (first) page to try again. Soā€¦

At this screen, select the first option

image

Enter ā€œx xā€ for First and last name and click CREATE YOUR AMAZON ACCOUNT

When that fails, select Sign in Already a customer?

The page then changes to show both email & password on the same page. (which is still the first page in the callback sequence)

Now you can select SIGN IN which then proceeds to the 2nd page which is Two-Step Verification

image

and the callback to HA will then occur where it will test if your email, password & OTP login was successful or not. If not, it sends you back to the first page in Amazonā€™s new 3 page sequence.

2 Likes

Thereā€™s nobody to maintain the WIKI! Care to contribute??

Alan has backed away from AMP & is only processing pull requests for code changes. Therefore it is currently on life support with only a handful of somewhat knowledgeable contributors like myself trying to keep it alive and breathing, but we only have so much spare time to contributeā€¦

1 Like