marklagendijk / node-toogoodtogo-watcher

Node.js cli tool for monitoring your favorite TooGoodToGo businesses. Docker image available.
MIT License
363 stars 116 forks source link

APIv7 --> APIv8 #210

Closed c0lumb0 closed 1 year ago

c0lumb0 commented 1 year ago

Seems like TGTG updated their API once more since I got this error recently

Error during request: POST https://apptoogoodtogo.com/api/item/v7/ { "favorites_only": true, "origin": { "latitude": 52.5170365, "longitude": 13.3888599 }, "radius": 200, "user_id": "123456789" }

HTTPError: Response code 403 (Forbidden) at Request.<anonymous> (C:\toogoodtogo-watcher\node_modules\got\dist\source\as-promise\index.js:118:42) at processTicksAndRejections (node:internal/process/task_queues:96:5)

Changing this

return api.post("item/v7/"

to

return api.post("item/v8/"

in api.js fixed the issue.

basti1499 commented 1 year ago

I am experiencing another HTTP 403 error, but this one occurs during the token refresh:

Error during request:
POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
{
    "refresh_token": "xxx"
}

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)

Anyone else with a similar issue or even a fix?

winus commented 1 year ago

I am experiencing another HTTP 403 error, but this one occurs during the token refresh:

Error during request:
POST https://apptoogoodtogo.com/api/auth/v3/token/refresh
{
    "refresh_token": "xxx"
}

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)

Anyone else with a similar issue or even a fix?

Having exactly the same problem, debugging since friday.

marklagendijk commented 1 year ago

Released in 3.9.2