marklagendijk/node-toogoodtogo-watcher

Add Datadome Configuration procedure to Readme file

Opened this issue · 4 comments

Would it be useful to add the procedure to complete header {"Cookie": } to the Readme file?

Something like (sorry if there are some errors, I am not very familiar with the procedure):

After login procedure, a TooGoodToGo Token must be generated following this procedure:

  1. Go to TooGoodToGo Token Refresh in a web browser (no smartphone).
  2. Open Developer Tools/network
  3. Refresh the page
  4. Click on message with the following properties:
  • Method: GET
  • File: favicon.ico
  1. Copy datadome value under Cookie header
  2. Paste it as follows as in the following example:
"headers": {
	"User-Agent": "TooGoodToGo/23.3.10 (550) (iPhone/iPhone 11 (GSM); iOS 16.3.1; Scale/2.00)",
	"Cookie": "datadome=2auLQNidCsqFN74ooGd8aToNCUAnI8-IK0Ho76fPaLYVVU4ontJsz28eT3_jZ9vcJXDLtOP-x9Vy1ULORBFHa70rf~MvlsHYolTpACw9gYh4RIXDbU9cuM-DlqJOQ9-y"
}, 

Only getting a 405 "Method not allowed" when visiting on a Browser? That can't be the correct way to do this, or is it?

@arnolicious it actually is correct. You will still see an attempt to download the favicon.ico which should contain the datadome token. If you don't see the cookie header on that request, look in the session storage of your browser (Firefox: F12, Tab web storage, cookies, toogoodtogo entry).

Well for me that never worked, what did now work was this:

  • Removing access token and refresh token from the config
  • Logging in with the email, getting the confirmation email from 2g2g
  • Opening that link in a Browser, opening the DevTools and picking out the Datadome cookie from there

The Value actually gets set there, so this must be the valid one.

  1. Copy datadome value under Cookie header

sorry for the noob question: do I have to copy the datadome value in the "Request headers" section or in the "Response headers" one?

Thank you,
Roberto