node-toogoodtogo-watcher
node-toogoodtogo-watcher copied to clipboard
The end is (or might be) near
It is quite likely that the end is near for this application. The reason is that TooGoodToGo seems to have started protecting their APIs against any automated use. This is probably caused by malicious automated use of their API. There have been people who offered payed services for 'snatching' TGTG deals.
I have always made it a point to use the public TooGoodToGo API in a respectful and fair manner:
- There is a minimal polling interval of 15 seconds.
- The application does not support automatic buying. This would be easy enough to implement, but I consider this a unfair advantage.
- The application has never employed any 'sneaky tactics' to avoid detection, or by pass any anti-bot mechanisms.
- I always made it clear that if the company TooGoodToGo doesn't like the way we are using it, they only need to say so, and I would disable this project.
I will continue to follow this approach. This means that if TooGoodToGo will start blocking the application, I will not accept any PRs to attempt to bypass such protection.
I will accept PRs that:
- Adjust the API code to deal with changes in the API, including things such as headers and request parameters, new authentication mechanisms etc.
I will reject PRs that:
- Try to bypass any bot protection mechanisms, such as CAPTHA's
- Employ 'sneaky tactics' such as timing / location / etc. randomization
I would like to ask everyone to respect this, and not submit any such PR here.
Okay, I totally agree.
I had thought that the paid offer was in partnership with tgtd and therefore at the origin of the blockages, but if this is not the case it is normal that tgtg seeks to protect itself from these robots.
The automatic purchase would indeed be too much.
Hope it will continue to work!
Thank you
Is this actually working for anyone? I haven't gotten it to work anymore, always 403 errors.
Mine is working for a while now. I while back (17 nov I think) I pulled a new version and cleared the accesstoken and the refreshtoken, and I think I got an email check after that. Been working smooth since. I use user agent 'TooGoodToGo'.
Mine is working for a while now. I while back (17 nov I think) I pulled a new version and cleared the accesstoken and the refreshtoken, and I think I got an email check after that. Been working smooth since. I use user agent 'TooGoodToGo'.
Tried this too...but I get the same error again..did you perform any other changes after pulling the new version?
I feel a bad programmer since i've tried to look into the API and find ways for automatic purchase, I didn't even find any endpoint to do so. I was trying to learn something. Not sell it or abuse it.
Mine stopped working today :-(
Please retry with the latest version (3.8.0) and login with either via the command line or via the Telegram bot.
Hmm, i logged into tgtg, but did not getting any notifications.
Thank you so much! It works again now. Hint to others: make sure to reset with toogoodtogo-watcher config-reset
first as the config layout has changed. Otherwise you'll see 403 or other errors.
I've just restarted monitoring, will see if there are any problems after one hour or so as another user has hinted
Edit: no problems after several hours
Please retry with the latest version (3.8.0) and login with either via the command line or via the Telegram bot.
Tried to log in with telegram (using docker), but it keep throwing me error 403 when I type /login [email protected]
:
HTTPError: Reponse code 403 (Forbidden) at Request.
(/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42) at processTicksAndRejections (internal/process/task_queues.js:95:5)
I also tried config-reset
but same error.
@lborruto does the login process report that it succeeded, or do you already get an error during the login process?
@lborruto does the login process report that it succeeded, or do you already get an error during the login process?
I got this message :
Will start the login process with the specified email address: [email protected]. Open the login email on your PC and click the link. Don't open the email on a phone that has the TooGoodToGo app installed. That won't work. When you clicked the link run: /login_continue
And then :
HTTPError: Reponse code 403 (Forbidden) at Request.
(/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42) at processTicksAndRejections (internal/process/task_queues.js:95:5)
Did you get the error when you ran the /login_continue
command?
Did you get the error when you ran the
/login_continue
command?
Nothing when I run the /login_continue
command, but I didn't received any email in the first place.
These two message pops up when I type /login [email protected]
.
This is the container log when I type /login_continue
:
2021-12-15T15:15:27.319917319Z Unhandled error while processing { 2021-12-15T15:15:27.319959188Z update_id: xxxx, 2021-12-15T15:15:27.319965168Z message: { 2021-12-15T15:15:27.319969456Z message_id: xxxx, 2021-12-15T15:15:27.319979274Z from: { 2021-12-15T15:15:27.319983923Z id: xxxx, 2021-12-15T15:15:27.319987870Z is_bot: false, 2021-12-15T15:15:27.319991968Z first_name: 'xxxxxx', 2021-12-15T15:15:27.319996066Z last_name: 'xxxxx', 2021-12-15T15:15:27.320000023Z language_code: 'en' 2021-12-15T15:15:27.320003971Z }, 2021-12-15T15:15:27.320070175Z chat: { 2021-12-15T15:15:27.320076988Z id: xxxxx, 2021-12-15T15:15:27.320082438Z first_name: 'xxx', 2021-12-15T15:15:27.320088469Z last_name: 'xxxx', 2021-12-15T15:15:27.320093960Z type: 'private' 2021-12-15T15:15:27.320098778Z }, 2021-12-15T15:15:27.320103828Z date: xxxxx, 2021-12-15T15:15:27.320108527Z text: '/login_continue', 2021-12-15T15:15:27.320113636Z entities: [ [Object] ] 2021-12-15T15:15:27.320118976Z } 2021-12-15T15:15:27.320124076Z } 2021-12-15T15:15:27.358729007Z (node:1) UnhandledPromiseRejectionWarning: HTTPError: Response code 400 (Bad Request) 2021-12-15T15:15:27.358780243Z at Request.
(/home/node/app/node_modules/got/dist/source/as-promise/index.js:117:42) 2021-12-15T15:15:27.358786986Z at processTicksAndRejections (internal/process/task_queues.js:95:5) 2021-12-15T15:15:27.358791244Z (Use node --trace-warnings ...
to show where the warning was created) 2021-12-15T15:15:27.358796093Z (node:1) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag--unhandled-rejections=strict
(see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) 2021-12-15T15:15:27.358865422Z (node:1) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
How are we supposed to set this up ( with the commands etc) if we run this on Docker ( synology) from DSM, not command line?
How are we supposed to set this up ( with the commands etc) if we run this on Docker ( synology) from DSM, not command line?
Via the Telegram bot.