thorsten-gehrig / alexa-remote-control

control Amazon Alexa from command Line (set volume, select station from tunein or pandora)
420 stars 103 forks source link

20220617 - "Strange" REFRESH_TOKEN generated by alexa-cookie-cli #158

Closed stbuerger closed 2 years ago

stbuerger commented 2 years ago

Since the (many month ago) working version of the alexa_remote_control.sh script and REFRESH_TOKEN (from 20211101) were only residing on a stored away backup, I today wanted to (re-)start with a fresh copy of the lates script version and a new TOKEN. When I started the (latest) alexe-cookie-cli (on WIN11) I was surprised by a VERY LONG output rather different from the format I seem to remember. Instead of starting with "Atnr|..." as still documented I get something like ..

"frc=slS12y51skdIRFnAYJR4IGMDLQ ...
...
..... vbS5hbWF6b24uZWNobyJ9fQ=="

All in all one line with 3152 characters. I assume the leading and trailing " must be omitted - still it didn't work assigning this "string" to the REFRESH_TOKEN variable.

I then digged out the old TOKEN from 2021 (containing the documented "Atnr|...") and surprisingly this still worked. Even my setup is working know, I'd like to share this an hope someone can shed some light on ...

Thx -stefan

adn77 commented 2 years ago

I just downloaded the latest version (win-x64) and ran the command without any options (German Amazon account). The result was just as expected: Atnr|EwICIH....

If you get frc=... that's some other part of the cookie. Can you check at https://www.amazon.de/hz/mycd/digital-console/devicedetails?deviceFamily=ALEXA_APP if your login was actually successful? You should see some ioBroker Alexa2 created at the current time.

Alex

stbuerger commented 2 years ago

Checked device details for ALEXA_APP and nothing (new) was there. Run another attempt - and this time it worked ! Thx