Description
The problem
When attempting to setup the Amazon Alexa Devices integration, I get an "Invalid Authentication" error.
With the previous third party integration: Alexa Media Player, which stopped working after I changed my password, I noticed during authentication that I didn't get an OTP request, just the CAPTCHA and setting up the integration failed every time after the password reset.
I am an early Alexa adopter, not sure if that helps or not.
I have reset my amazon account a long time ago to use an authenticator app and use it every time I login to my account with a web browser without trouble.
What version of Home Assistant Core has the issue?
core-2025.6.0
What was the last working version of Home Assistant Core?
b/a
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Alexa Devices
Link to integration documentation on our website
https://www.home-assistant.io/integrations/alexa_devices
Diagnostics information
How do i get diagnostics info?
Example YAML snippet
Anything in the logs that might be useful for us?
2025-06-12 15:38:32.658 DEBUG (MainThread) [aioamazondevices] Cannot find previous login data, creating new serial number
2025-06-12 15:38:32.659 DEBUG (MainThread) [aioamazondevices] Logging-in for xxxxx@xxxxx.com [otp code xxxxxx]
2025-06-12 15:38:32.659 DEBUG (MainThread) [aioamazondevices] Creating HTTP session (aiohttp)
2025-06-12 15:38:32.659 DEBUG (MainThread) [aioamazondevices] Build oauth URL
2025-06-12 15:38:32.659 DEBUG (MainThread) [aioamazondevices] GET request: https://www.amazon.co.uk/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=BK1ZasDYwbkroRSzRoaXJ5f8qjVH8pI7N5Sj0QsmYxI&openid.return_to=https%3A%2F%2Fwww.amazon.co.uk%2Fap%2Fmaplanding&openid.assoc_handle=amzn_dp_project_dee_ios_uk&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A344335334345443131394441343233324143373638434237374431363439443523413249564c5635564d32573831&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 with payload None [json=False]
2025-06-12 15:38:32.825 DEBUG (MainThread) [aioamazondevices] Cookies from headers: {'session-id': '260-5747072-8280912', 'session-id-time': '2380459112l'}
2025-06-12 15:38:32.825 DEBUG (MainThread) [aioamazondevices] Response 200 for url https://www.amazon.co.uk/ap/signin?openid.oa2.response_type=code&openid.oa2.code_challenge_method=S256&openid.oa2.code_challenge=BK1ZasDYwbkroRSzRoaXJ5f8qjVH8pI7N5Sj0QsmYxI&openid.return_to=https%3A%2F%2Fwww.amazon.co.uk%2Fap%2Fmaplanding&openid.assoc_handle=amzn_dp_project_dee_ios_uk&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&accountStatusPolicy=P1&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.mode=checkid_setup&openid.ns.oa2=http%3A%2F%2Fwww.amazon.com%2Fap%2Fext%2Foauth%2F2&openid.oa2.client_id=device%3A344335334345443131394441343233324143373638434237374431363439443523413249564c5635564d32573831&openid.ns.pape=http%3A%2F%2Fspecs.openid.net%2Fextensions%2Fpape%2F1.0&openid.oa2.scope=device_auth_access&forceMobileLayout=true&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&openid.pape.max_auth_age=0 with content type: text/html;charset=UTF-8
2025-06-12 15:38:33.030 DEBUG (MainThread) [aioamazondevices] Get request data from HTML source
2025-06-12 15:38:33.032 DEBUG (MainThread) [aioamazondevices] Register at https://www.amazon.co.uk/ap/signin/260-5747072-8280912
2025-06-12 15:38:33.032 DEBUG (MainThread) [aioamazondevices] post request: https://www.amazon.co.uk/ap/signin/260-5747072-8280912 with payload {'appActionToken': 'mqNsSmbcLRoCClFVT6dAo3O1wfTHniMZ4yYvdmHEZck=:2', 'appAction': 'SIGNIN_PWD_COLLECT', 'webAuthnChallengeIdForAutofill': 'WsWWZWwmBtlSGND1WDBmOEuW3NdNHdLh:EU', 'webAuthnGetParametersForAutofill': 'eyJycElkIjoiYW1hem9uLmNvLnVrIiwiY2hhbGxlbmdlIjoiV3NXV1pXd21CdGxTR05EMVdEQm1PRXVXM05kTkhkTGgiLCJ0aW1lb3V0Ijo5MDAwMDAsIm1lZGlhdGlvbiI6ImNvbmRpdGlvbmFsIiwidXNlclZlcmlmaWNhdGlvbiI6InByZWZlcnJlZCJ9', 'openid.return_to': 'ape:aHR0cHM6Ly93d3cuYW1hem9uLmNvLnVrL2FwL21hcGxhbmRpbmc=', 'prevRID': 'ape:RzhXN0ZDQ0MxRENEQU1GS1FaME0=', 'workflowState': 'eyJ6aXAiOiJERUYiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiQTI1NktXIn0.Kkvsgycj0q5R0P-uV5fcfLLJoWQrOb9yZ0ZoZ5xYs7yiSB-9WzTSSg.f5DY1h9x9TqeFTCE.DgFFVkCCQ1jkkEgZ4ErXmo8EIOKwybEcfKXHV23xCn3ZK-BYP93yLyFJc5jRyuWIL4TUj1YmS0hOqDQCuFLGwSZ-FsiXQfQESAkU3E5T9Zx-GPBk9OFz4sisbppO3Z0B5rdF7rNIv1Y-MIrCxJcD_TgAK0-Wy87kD80NPXE2KOpXy91VVKwMVs1mD-6LXs_DkA5m16vxKV_LzdlJreZnvTruIzu9OvgCd5hWsTtskCN74kquxQKyn54Q3T_P3iMmJua47ib6LhWU7ia9jwgLp4FR7h__vd5ugFLFI004vB6f6sTAGv7JfqadbP7owirIozdrScN4GlECByRXlKYp0DOEkUDEebWULjeOkvSCAUa1wjYCanzc8HlUV_kUtYqZ8qdVElFO-Av5KjXXvvspFtPNlu2e3Mx9THx67H4oOICUyxv4WL7lsjvFvFIBR3uYD6GE3TisxsnFTSdzYi3Y_BvBhaV6dffbibJTG6F7jQYn9S3SrfjGgHvt5OaWjoihyIPhsn4mnf9WfCmG-1GMQs0EbVAFJ3PTc8R0w1yC_5L6RLGvSlW1wXshZH7Q81dFn0EUZWsIoU3TDFqTa3xjiY7iIpv8QDgTcHAj5PCRf0AeRX3mlbB20g.UCCwS4I-QJH0SeOg2NvA2Q', 'useRecyclingRule': 'false', 'subPageType': 'SignInClaimCollect', 'shouldShowPersistentLabels': 'true', 'countryCode': 'GB', 'email': 'xxxx@xxxx.com', 'password': 'zzzzzzzz '} [json=False]
2025-06-12 15:38:33.411 DEBUG (MainThread) [aioamazondevices] Cookies from headers: {'session-id': '260-5747072-8280912', 'session-id-time': '2082787201l', 'session-token': '6+5suJwjAnudc8sxOhFE3qZMku6jB1X1o7uiEpV5PlE3ubXYXvELeMuE545EjUiso4QjXiDgCjUqgm/LGyXt/Aq09uQQ7ixhJe1IgDdP4EQCkpOuLXGBysEBWEmWHtuKNQ884oIoOUTpMPOgJiD+zbqd3vtSwJFmMfkzPZDLC026V6F0MV1rYK5N96QBRnFiHahmKeITGePKCzbSVwSEn6SvhjfPHRMZebE5TJg61IXi9fyfCsN5T6KJn4KF+yATbu/4VOk6lW3z7a25D/1oBwHe83n6DoODPAJ5BT1Udi+FtU9NkkE4A3xpemATT4Ejoyyw+7kErwD+Knf8XuGbvga6jDjCJxFvnlYT1KWWYP0='}
2025-06-12 15:38:33.411 DEBUG (MainThread) [aioamazondevices] Response 200 for url https://www.amazon.co.uk/ap/signin/260-5747072-8280912 with content type: text/html;charset=UTF-8
2025-06-12 15:38:33.422 DEBUG (MainThread) [aioamazondevices] Cannot find "auth-mfa-otpcode" in html source [https://www.amazon.co.uk/ap/signin/260-5747072-8280912]
2025-06-12 15:38:33.422 DEBUG (MainThread) [aioamazondevices] Closing HTTP session (aiohttp)
Additional information
No response
/edit: added logs I submitted later in this post.
SOLUTION / SOLVED
I'm going to own up to this one. When I first setup alexa oh so many years ago, a different password was used from my main amazon account (I was an early adopter, I had an original beta release/was a tester along with a Nest tester, devices were registered and managed against a different site : alexa.amazon.com)
At some point, some magic happened at amazon and the alexa account and amazon account were (I assume) merged.
Soooo, yeah, I'd been using the wrong password.
I'd like to apologise for being a dumb ass and hope I hadn't wasted anyone's time.