node-toogoodtogo-watcher: Watch command gives error during token refresh request
After I successfully login with “toogoodtogo-watcher login” with the message You are now successfully logged in! and then try “toogoodtogo-watcher watch” I immediately get the following:
Error during request:
POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
{
"refresh_token": "..."
}
HTTPError: Response code 403 (Forbidden)
at Request.<anonymous> (/home/bitnami/.nvm/versions/node/v16.6.2/lib/node_modules/toogoodtogo-watcher/no
de_modules/got/dist/source/as-promise/index.js:118:42)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
My node version is v16.6.2
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 23 (5 by maintainers)
What I did:
Edit: It worked for a small bit, but it now gives errors again at the refresh 🤔 (even if I update the cookie) Edit2: It seems that refreshing the token doesn’t work, but I do get notifications of new TGTG offers Edit3: After a few days, it still seems to work. I even don’t get any errors refreshing my token
Please see https://github.com/marklagendijk/node-toogoodtogo-watcher/issues/212#issuecomment-1431987652 for that.
Yup, it works for me for some days now. Although postman did not get me a datadome cookie, opening the refreshing token request in the browser, with solving the captcha did and then I added the cookie as described:
"deviceType": "IOS", "headers": { "Cookie": "datadome=..." }, "pollingIntervalInMs": 30000,It does seem to be a datadome issue. I have moved on to trying to get this running on my raspberry pi and there I have the same issues. I took the failed refresh request from my pi to postman on my local pc. Here, after changing the User-Agent in the headers, the refresh request worked and with it I got a datadome cookie. I took this cookie and updated my config like so
now
toogoodtogo-watcher watchseems to be working on my pi, but probably only until my datadome cookie expires. Also since datadome cookie is ip specific I could only use it on other devices in my local network. So the same trick did not work on AWS.I would not say this a solution, just simply the results of my own investigation to this issue.
I run the application on a small windows tablet. When I first got the error, I reinstalled the application from scratch, then it worked for 2 days or so before again getting the error. Now a reinstallation doesn’t work anymore 😦
Maybe it is really an IP issue? Other TGTG applications have similar issues but also related to
Datadomeprotection…