Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apptoogoodtogo.com/api/item/v8 - 403 Error #230

Open
pizzaisdavid opened this issue Apr 13, 2023 · 11 comments
Open

apptoogoodtogo.com/api/item/v8 - 403 Error #230

pizzaisdavid opened this issue Apr 13, 2023 · 11 comments

Comments

@pizzaisdavid
Copy link

I think I have configured it correctly, logged in, and ran the watch command.

root@ubuntu-s-1vcpu-1gb-nyc1-01:/var/www/tgtg-watcher# toogoodtogo-watcher watch
Error during request:
POST https://apptoogoodtogo.com/api/item/v8/
undefined

HTTPError: Response code 403 ()
    at Request.<anonymous> (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/as-promise/index.js:86:42)
    at Object.onceWrapper (node:events:628:26)
    at Request.emit (node:events:525:35)
    at Request._onResponseBase (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:726:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Request._onResponse (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:765:13)
Error during request:
POST https://apptoogoodtogo.com/api/item/v8/
undefined

HTTPError: Response code 403 ()
    at Request.<anonymous> (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/as-promise/index.js:86:42)
    at Object.onceWrapper (node:events:628:26)
    at Request.emit (node:events:525:35)
    at Request._onResponseBase (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:726:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Request._onResponse (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:765:13)
Error during request:
POST https://apptoogoodtogo.com/api/item/v8/
undefined

HTTPError: Response code 403 ()
    at Request.<anonymous> (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/as-promise/index.js:86:42)
    at Object.onceWrapper (node:events:628:26)
    at Request.emit (node:events:525:35)
    at Request._onResponseBase (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:726:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Request._onResponse (file:///root/.nvm/versions/node/v18.13.0/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/core/index.js:765:13)
@c0lumb0
Copy link

c0lumb0 commented Apr 14, 2023

Do you have set some favorites in your TGTG app?
I think I've seen this error before, which occurs when no favorites are defined in order to be checked by the application.

@svennergr
Copy link

Same issue for me and I do have favorites.

@jonathanroze
Copy link

I've also have this issue, with favorites

@c0lumb0
Copy link

c0lumb0 commented May 25, 2023

Strange error tbh...
The last change regarding any api v8 was here

#210

and it was just the small endpoint change from v7 to v8 and worked again. I'm not experiencing the error you've described. Which notifications did you set to TRUE?

@fxhuhn
Copy link

fxhuhn commented May 28, 2023

Same here, after relogin it worked for a couple of hours
toogoodtogo-watcher.pdf

@c0lumb0
Copy link

c0lumb0 commented May 31, 2023

Maybe they updated their API again and it's just v9 now instead of v8? Can somebody try just like here

#210

UPDT: It has to be something else, just tried v9 and did not work, but with v8 it still does. Just noticed though that from time to time i get a similar error like this one here, to be precise it's the one from #210 but this time it just shows the error but keeps working.

@pstefan
Copy link

pstefan commented Jun 19, 2023

TooGoodToGo has added a bot check to its api. I've also got this in my app where I have to slide a puzzle tile to the correct position in an image.

Have a look at #231
It contains a description how to add the verification result (User-Agent & Datadome Cookie) to the config. For me this has worked.

@gblanc
Copy link

gblanc commented Jun 22, 2023

Hello, for me it doesn't work...
I work with docker, I have added datadome in my config file and I have always this error :

Error during request:
toogoodtogo-watcher_1 | POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
toogoodtogo-watcher_1 | undefined
toogoodtogo-watcher_1 |
toogoodtogo-watcher_1 | HTTPError: Response code 403 (Forbidden)
toogoodtogo-watcher_1 | at Request. (file:///home/node/app/node_modules/got/dist/source/as-promise/index.js:86:42)
toogoodtogo-watcher_1 | at Object.onceWrapper (node:events:628:26)
toogoodtogo-watcher_1 | at Request.emit (node:events:525:35)
toogoodtogo-watcher_1 | at Request._onResponseBase (file:///home/node/app/node_modules/got/dist/source/core/index.js:726:22)
toogoodtogo-watcher_1 | at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
toogoodtogo-watcher_1 | at async Request._onResponse (file:///home/node/app/node_modules/got/dist/source/core/index.js:765:13)
toogoodtogo-watcher_1 | Error during request:
toogoodtogo-watcher_1 | POST https://apptoogoodtogo.com/api/auth/v3/token/refresh

@arnolicious
Copy link

Same here, I also deleted my saved credentials from the config file, thinking it had something to do with the refresh token not being valid anymore, but still getting 403s

@yldun
Copy link

yldun commented Jul 3, 2023

Hello,

I had the same error
HTTPError: Response code 403 (Forbidden) at Request. (file:///home/node/app/node_modules/got/dist/source/as-promise/index.js:86:42)
I replaced Node 19.X.Y with Node 20.X.Y and everything is now working though I had to remove nodejs then reinstall it from here https://github.com/nodesource/distributions#debinstall

@c0lumb0
Copy link

c0lumb0 commented Sep 15, 2023

FYI - the datadome cookie seems to expire from time to time, which could result in certain errors, which was the case for me. In this case just get a new one via

https://apptoogoodtogo.com/api/item/v8/

solve the captcha and edit the config accordingly.
After that, it worked again for me.

UPDT:
The error messages still appear but the notifications are working. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants