node-toogoodtogo-watcher: Error 403 on POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
I am experiencing the following 403 error:
Error during request:
POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
{
"refresh_token": "[removed]"
}
HTTPError: Response code 403 (Forbidden)
at Request.<anonymous> (/usr/lib/node_modules/toogoodtogo-watcher/node_modules/got/dist/source/as-promise/index.js:118:42)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
No known fix yet.
Will update this post if I find a solution.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 35 (10 by maintainers)
The
405response code indicates that the http method you used is not allowed by this endpoint. If you paste the given URL into your browser and open it, it will send aGETrequest which get’s denied, because the endpoint only supportsPOSTrequests. This shouldn’t be an issue though, the datadome cookie still gets set.Edit: in Chromium based browsers you can find it in the dev tools (F12) under application > cookies
Updated to version 4.0.3 and removed Cookie header from config but still getting 403 error due to datadome cookie. Does this mean my personal IP address got blocked by TGTG?
Few points:
Used last version, removed headers (cookie), starting new login (via telegram and node):
Something went wrong “HTTPError: Response code 403 (Forbidden) at Request.<anonymous> (file:///home/node/app/node_modules/got/dist/source/as-promise/index.js:86:42)\n at Object.onceWrapper (node:events:628:26)\n at Request.emit (node:events:525:35)\n at Request._onResponseBase (file:///home/node/app/node_modules/got/dist/source/core/index.js:726:22)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Request._onResponse (file:///home/node/app/node_modules/got/dist/source/core/index.js:765:13)”
Is the body correct (email is not displayed) in output: body: ‘{“device_type”:“IOS”,“email”:“Email of your TooGoodToGo account.”}’,
I updated to
3.10.0and I don’t get any error message anymore, but I also don’t get any other message. Will try again this evening.I started with a fresh installation, anything else to do than regular installation (and adding the cookie to the header)? It feels like the bot isn’t sending any API calls, atleast I couldn’t find it in the network traffic. Is it possible to enable some more verbose output for debugging?
This should be the datadome cookie issue, as far as I can see, since it is the same error message also in here
https://github.com/marklagendijk/node-toogoodtogo-watcher/issues/201
Since adding this fix, I don’t get this error anymore.