Apollon77 / alexa-cookie

Library to generate a cookie including a csrf for alexa remote
MIT License
36 stars 13 forks source link

The created refresh_token does not work with alexa_remote_control.sh. #131

Closed thestraycat closed 9 months ago

thestraycat commented 9 months ago

Describe the bug

I'm based in the UK. Using windows 11 and Ubuntu to create the refresh token.

I have sucessfully created the refresh_token on Windows and Linux but i get the same problem on both platforms triny to use the refresh token created from the CLI binary tool on both platforms. The refresh token is created successfully, i check it's formatting for extra spaces etc... See below: (not my real token!)

Atnr|EwICIAtIeD15rtIJ3bSpCb02hlUAqWw1GriZbBDPmNrZ4ZWTWaQIFsn6l7KNcAVZ2lTQbtcC6X_WiosJ-yx5wqVqTzloFn0yzmJ1QCkDJy-j-pN4cWaowcmOJGBjXAdgkHAFzDV6gLTzLivCYR1doOt4irDmM4JApiHWE1HEZpIp7XLHZ07aavAK2NaM7QI9lV6UJJTtZHsFzaRPajYK2yxZdZAZZoRVp-qdqI8yFDE057PkfF9F_FfGmNpAvjXqTptuwBCapCzTPUPHUEshkD3CXQml4fHeHYMhlhmh_zeVj39nL1h27-yBqwvB1AI68q3bxdqJ99EEq2uIeCaPOR7DONVh5WI49tZQB71yPJJ-L7iqeFVY0F4bMBMCUUUcMknbXH1

I paste it into refresh_token within the the alexa_remote_control,sh script (including the "Atnr|" bit!)

image

And i get the following errors:

image

I've created the token using the following cli arguments, nothing has worked.

alexa-cookie-cli-linux-64 -p amazon.co.uk -a en-GB -L en-GB
alexa-cookie-cli-linux-64 -p amazon.co.uk -a en-EN -L en-EN
alexa-cookie-cli-linux-64

To Reproduce
Steps to reproduce the behavior:

  1. Create a token
  2. Copy it into the refresh_token variable in the alexa_remote_control.sh script
  3. Run ./alexa_remote_control.sh to get a new token.
  4. See failure message.

Expected behavior
A new token to be created.

Screenshots & Logfiles
See above.

Apollon77 commented 9 months ago

honestly, I do mot know how I could help, beside stating that i do not know against whoch hosts/domains from amazon the shell script works and it can be a difference ... that is more a question for the alexa-control.sh honestly if the refresh token gathered via alexa-cookie for UK is supposed to work

thestraycat commented 9 months ago

Fixed it. There was a slightly modified version of the alexa_remote_control,sh from over a year ago that was one revision newer than mine and had omitted some code referring to the jq package which had allowed the refresh_token to be parsed correctly.