-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
TgtgLoginError - Seems like two factor auth is required // Error 403 #119
Comments
Not sure, if it possible to use this python code for token authentication? |
@VeslavG this implementation has the same issue as the node-js one. Both need some rewrite of the login method used. |
Thanks for the clarification. |
marklagendijk/node-toogoodtogo-watcher#114 Quick fix - just add it here https://github.com/ahivert/tgtg-python/blob/master/tgtg/__init__.py#L64 |
True. When providing But still needs to overhaul login process or at least provide the keyword |
I was able to fix this error by switching LOGIN_ENDPOINT to "auth/v2/loginByEmail" |
Sorry for the delay, just published new release 0.7.0 that will fix the login + let you build the client with access_token, refresh_token and user_id. |
thx @ahivert , nice to see you did not let the project die <3 Sadly, for me, and I guess a lot of others, the 'banning issue' still persists as a problem. My ipv4 is stuck behind the captcha ('data dome' bot blocker). As it is static I cannot simply reconnect and go on. I think in that case, somehow getting the captcha visible and solving is required. Then the returned cookie needs to be used for the next request, and each returned cookie must be reused. At least that seems to be what the app is doing... |
I was affected by the same @MaxWinterstein I do have a static IPv4 as well as my ISP doesn't support port forwarding otherwise. I don't think this is relevant even though I've seen the post on the other issue ticket as well. Even more because using the app on any smartphone still worked here, too and, may it be this client or the regular app, they have the same IPv4 on the outside. |
I got the captcha also displayed at the app at one point. I guess there is more than the IP only used at Data Dome to calculate if you are a bad guy or not. But no idea how they create their fingerprint in detail... Sadly, root@e7e84399196c:/# pip install tgtg
Collecting tgtg
Downloading tgtg-0.7.0-py3-none-any.whl (5.9 kB)
Collecting requests==2.26.0
Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
|████████████████████████████████| 62 kB 521 kB/s
Collecting charset-normalizer~=2.0.0
Downloading charset_normalizer-2.0.7-py3-none-any.whl (38 kB)
Collecting idna<4,>=2.5
Downloading idna-3.3-py3-none-any.whl (61 kB)
|████████████████████████████████| 61 kB 2.5 MB/s
Collecting certifi>=2017.4.17
Downloading certifi-2021.10.8-py2.py3-none-any.whl (149 kB)
|████████████████████████████████| 149 kB 3.9 MB/s
Collecting urllib3<1.27,>=1.21.1
Downloading urllib3-1.26.7-py2.py3-none-any.whl (138 kB)
|████████████████████████████████| 138 kB 3.3 MB/s
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests, tgtg
Successfully installed certifi-2021.10.8 charset-normalizer-2.0.7 idna-3.3 requests-2.26.0 tgtg-0.7.0 urllib3-1.26.7
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
root@e7e84399196c:/# python Python 3.9.8 (main, Nov 10 2021, 02:58:52)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tgtg import TgtgClient
>>> client = TgtgClient(email='REDACTED', password='REDACTED')
>>> client.login()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.9/site-packages/tgtg/__init__.py", line 126, in login
raise TgtgLoginError(response.status_code, response.content)
tgtg.exceptions.TgtgLoginError: (403, b'<html><head><title>apptoogoodtogo.com</title><style>#cmsg{animation: A 1.5s;}@keyframes A{0%{opacity:0;}99%{opacity:0;}100%{opacity:1;}}</style></head><body style="margin:0"><p id="cmsg">Please enable JS and disable any ad blocker</p><script>var dd={\'cid\':\'REDACTED-RQ==\',\'hsh\':\'REDACTED\',\'t\':\'fe\',\'r\':\'b\',\'s\':35693,\'host\':\'geo.captcha-delivery.com\'}</script><script src="https://ct.captcha-delivery.com/c.js"></script></body></html>\n')
>>> |
I donwloaded the latest version of the code and still the same error. Anybody else managed to get it solved? |
same problems here. Traceback (most recent call last): |
I have build a new version witch works with the new endpoints. TgtgClient(email="[email protected]") After loging in, you should get an email. Changes are here: Please give me feedback. If this works, I will open an PR. PPS: There are some people getting captcha request. There is an issue open in my forked repo. Feel free to help us to get the captcha url. |
I write how I "solved" it. |
As if I wasn't, even once a minute I get blocked... And I must necessarily change my IP address |
New release 0.8.0 available |
Has anyone made the application work again with the 2FA via mail? I tried a few things with VPN and setting different levels get_item(), but did not succeed. :( |
With 0.8.0, for me, it works without problems, what errors do you have? |
I have the same issue with 0.8.0, nothing fix it:
When I
Am I alone ? Is there a way to fix this ? |
You're not alone, I have the same |
See also #124 (comment) + following comment |
0.9.0 should solve this issue |
First seen on a mobile a few days ago, now happening to me here too:
On mobile, an email is sent with a 6-digits code that needs to be entered into the app, or a link that opens up the app.
The text was updated successfully, but these errors were encountered: