BewhiskeredBard / homebridge-alexa-player

A Homebridge plugin that enables basic smart speaker HomeKit integration for Alexa devices (Echo, Echo Dot, etc.).
MIT License
92 stars 8 forks source link

Guide to getting Amazon Authentication Cookie #260

Open Quintin9801 opened 3 years ago

Quintin9801 commented 3 years ago

Problem

A guide on how to obtain an Amazon Authentication Cookie for setup would be great. I'm not quite sure where I should be looking in the network traffic when logging in.

Geek-MD commented 3 years ago

+1 please

gavinkleckner commented 3 years ago

So once you download the plug-in you should see this in your logs B341B4C2-A243-44AC-B9DD-02061492EC80 You should be able to tap on the part that’s underlined Blow 18435E03-6E97-4621-91AD-53E1C5A93456 Once you tap on that it’ll take you to this page 38C5B0C2-9356-4C58-B536-55F66A467474 Then you log into your Amazon account that your echo devices are linked to Then you log into your Amazon account that your echo devices are linked to and you should see this after you click sign in BF2537D9-305E-45A4-9B1D-954CC6B26100 After that go back to your logs and you should see a large section of taxed in yellow After that go back to your logs and you should see a large section of text in yellow And it’ll start with this C4DFF463-EE88-4CDE-9681-7AE8954B4039 Copy and paste all the text in yellow after that (If you running iOS 15 Take a screenshot and then copy it from photos if you’re running something earlier download your logs And then copy it from that) After you have it copied you should be able to paste it In the section labelled cookie A6F340BB-3543-478C-B137-592841525AF1 Then hit save and restart homebridge

bramnet commented 3 years ago

What do we do if the yellow text doesn't appear in the logs? Is there a debug flag we have to have turned on? I think it would be easier if the name of the auth cookie was given (then I can use cookie lookup tools)

Edit: Okay, for anyone reading this. 1: it's not grabbing A cookie, it's grabbing MULTIPLE cookies, in a list. ALSO, if you have anything written into the "Cookie" field in the plugin's settings, that yellow text will not appear, keep that in mind.

Ricrod84 commented 2 years ago

Trying to setup this... When trying to get the cookies, and tapping into the address marked in red it doesn't open any page: It says it can't connect to the server... Any help is greatly appreciated

Edit: NEVER MIND! UP AND RUNNING!

xCNA commented 2 years ago

After that go back to your logs and you should see a large section of taxed in yellow After that go back to your logs and you should see a large section of text in yellow And it’ll start with this C4DFF463-EE88-4CDE-9681-7AE8954B4039 Copy and paste all the text in yellow after that (If you running iOS 15 Take a screenshot and then copy it from photos if you’re running something earlier download your logs And then copy it from that) After you have it copied you should be able to paste it In the section labelled cookie

Thanks --- These instructions worked perfectly, except instead of receiving yellow text with my cookie information, I received the following error instead after successfully retrieving my amazon alexa cookie. Any thoughts here? I havent edited the .json beyond basic confg.

Failed to initialize. SyntaxError: Unexpected end of JSON input at JSON.parse () at /usr/local/lib/node_modules/homebridge-alexa-player/node_modules/alexa-cookie2/alexa-cookie.js:532:67 at IncomingMessage. (/usr/local/lib/node_modules/homebridge-alexa-player/node_modules/alexa-cookie2/alexa-cookie.js:111:33) at IncomingMessage.emit (node:events:539:35) at endReadableNT (node:internal/streams/readable:1344:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)

champagnearni commented 2 days ago

After that go back to your logs and you should see a large section of taxed in yellow After that go back to your logs and you should see a large section of text in yellow And it’ll start with this C4DFF463-EE88-4CDE-9681-7AE8954B4039 Copy and paste all the text in yellow after that (If you running iOS 15 Take a screenshot and then copy it from photos if you’re running something earlier download your logs And then copy it from that) After you have it copied you should be able to paste it In the section labelled cookie

Thanks --- These instructions worked perfectly, except instead of receiving yellow text with my cookie information, I received the following error instead after successfully retrieving my amazon alexa cookie. Any thoughts here? I havent edited the .json beyond basic confg.

Failed to initialize. SyntaxError: Unexpected end of JSON input at JSON.parse () at /usr/local/lib/node_modules/homebridge-alexa-player/node_modules/alexa-cookie2/alexa-cookie.js:532:67 at IncomingMessage. (/usr/local/lib/node_modules/homebridge-alexa-player/node_modules/alexa-cookie2/alexa-cookie.js:111:33) at IncomingMessage.emit (node:events:539:35) at endReadableNT (node:internal/streams/readable:1344:12) at processTicksAndRejections (node:internal/process/task_queues:82:21)

Getting this also