node-toogoodtogo-watcher
node-toogoodtogo-watcher copied to clipboard
HTTPError: Response code 403
Hi,
Had this error since 2-3 days. Tested from several servers, with Node.JS v21 and v18. Am i the only one to encouter this issue ?
Something went wrong: HTTPError: Response code 403 ()
at Request.
Thanks !
Getting the same error even with a fresh install on new PC
Same here. Some days it works on other days, for 2-3 days now, it shows the error messages. There is also
https://github.com/marklagendijk/node-toogoodtogo-watcher/issues/245
regarding this, so this issue should have popped up in Oct 23 already.
Same error here, I'm running toogoodtogo-watcher --version 4.0.3
HTTPError: Response code 403 ()
at Request.
Looks like this error is during the login. I tried to login in my telegram bot and got the same error in telegram.
That issue doesn't depend on Node version or machine configuration, which it launched on. The nature of it is behind the scenes - it uses same location for all of launched instances, because of it's hardrcoded
export function listFavoriteBusinesses() {
const session = getSession();
return api.post("item/v8/", {
json: {
favorites_only: true,
origin: {
latitude: 52.5170365,
longitude: 13.3888599,
},
radius: 200,
user_id: session.userId,
},
headers: {
Authorization: `Bearer ${session.accessToken}`,
},
});
}
As you can observe in request data was provided location, which is static, and when request is sending to 2good2go api - then it respond with captcha, which doesn't handled. Probably they added it few months ago.
I found the solution for that one issue, but hadn't time to even create PR with bug fix. I'll try to make it later today or tomorrow and mention it in that issue
Hey !
Thanks for your feedback ! I just tried some other tgtg bots. And had the same issue (error 403) i also noticed that the issue is from an uncompleted captcha code. Instead of a previous digit code needed to be type in the console. I use the script from my home place. Phone already connected on the same IP...
I hope the developper of these bots will be able to solve these captcha from the script !
That issue doesn't depend on Node version or machine configuration, which it launched on. The nature of it is behind the scenes - it uses same location for all of launched instances, because of it's hardrcoded
export function listFavoriteBusinesses() { const session = getSession(); return api.post("item/v8/", { json: { favorites_only: true, origin: { latitude: 52.5170365, longitude: 13.3888599, }, radius: 200, user_id: session.userId, }, headers: { Authorization: `Bearer ${session.accessToken}`, }, }); }
As you can observe in request data was provided location, which is static, and when request is sending to 2good2go api - then it respond with captcha, which doesn't handled. Probably they added it few months ago.
I found the solution for that one issue, but hadn't time to even create PR with bug fix. I'll try to make it later today or tomorrow and mention it in that issue
I made the changes, i think its because i can't change the ip there i'm running on a NUC and there are more processes running on that device.
Just dropping by, beside the 403 error, do you guys also have the problem described in #246?
Got it working, posted the resolution to #248
After being annoyed by 403 every now and then. I used my own project which send the requests through a Chrome browser and this worked perfectly: https://github.com/unixfox/pupflare
- I ran my project in local.
- Changed
https://apptoogoodtogo.com/api/
tohttp://localhost:3000/?url=https://apptoogoodtogo.com/api/
in this file: https://github.com/marklagendijk/node-toogoodtogo-watcher/blob/master/lib/toogoodtogo-api.js#L8 - Ran the app like before. No 403 error. May require two rerun.
After being annoyed by 403 every now and then. I used my own project which send the requests through a Chrome browser and this worked perfectly: https://github.com/unixfox/pupflare
1. I ran my project in local. 2. Changed `https://apptoogoodtogo.com/api/` to `http://localhost:3000/?url=https://apptoogoodtogo.com/api/` in this file: https://github.com/marklagendijk/node-toogoodtogo-watcher/blob/master/lib/toogoodtogo-api.js#L8 3. Ran the app like before. No 403 error. May require two rerun.
Thanks for the tip, seems to be working for me. Those captcha links were getting annoying.
After being annoyed by 403 every now and then. I used my own project which send the requests through a Chrome browser and this worked perfectly: https://github.com/unixfox/pupflare
- I ran my project in local.
- Changed
https://apptoogoodtogo.com/api/
tohttp://localhost:3000/?url=https://apptoogoodtogo.com/api/
in this file: https://github.com/marklagendijk/node-toogoodtogo-watcher/blob/master/lib/toogoodtogo-api.js#L8- Ran the app like before. No 403 error. May require two rerun.
sadly pupflare doesnt have arm64 distr though, so doesnt work on raspi
sadly pupflare doesnt have arm64 distr though, so doesnt work on raspi
You can install it outside of docker. Just install nodejs on raspberry pi and run it...
Anyway I have added ARM64 support on the Docker image so you should be able to use it in Docker now.
I used the docker image of pupflare for a couple of weeks, worked fine until Feb 9, now I'm getting 403 even when routed through this proxy. Seems like tgtg/Cloudflare upping their game. When I load up the tgtg app on my phone, I'm also getting the captcha puzzles to solve. Anyone else with similar issues and potentially another solution?
Edit: Fixed it by updating to tgtg-watcher 4.0.4, no pupflare needed!