Giter Site home page Giter Site logo

Comments (15)

wieluk avatar wieluk commented on August 15, 2024 1

It works now with version 0.10.0

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Hi @goegol,
Could you please elaborate? which python code are you referring to?

from home_assistant_tgtg.

TanguyOrtegat avatar TanguyOrtegat commented on August 15, 2024

yes error 404, now when you want to login to tgtg, you enter email in the app, then tgtg sends you and email that you need to accept and then you are automaticly logged in to the app. no password needed anymore

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Did you check the top of the script, with a suggested way to reset your password? https://github.com/Chouffy/home_assistant_tgtg/blob/main/tgtg_get_tokens.py#L7

from home_assistant_tgtg.

TanguyOrtegat avatar TanguyOrtegat commented on August 15, 2024

id you check the top of the script, with a suggested way

I have a password normally, tgtg changed way of working

from home_assistant_tgtg.

goegol avatar goegol commented on August 15, 2024

@Chouffy i use you're example python script.
The reset password is not working for me (create also seperate, new, account on gmail address). I didn't receive any password reset mail.

When i run the script i got a 404 (404 page / api not found, i expect other http code if password is wrong / not usable)

Traceback (most recent call last): File "/home/goegol/tgto.py", line 17, in <module> client.get_items() File "/root/.local/share/virtualenvs/goegol-54Koo1qd/lib/python3.9/site-packages/tgtg/__init__.py", line 147, in get_items self.login() File "/root/.local/share/virtualenvs/goegol-54Koo1qd/lib/python3.9/site-packages/tgtg/__init__.py", line 126, in login raise TgtgLoginError(response.status_code, response.content) tgtg.exceptions.TgtgLoginError: (404, b'')

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Indeed you're right, I can reproduce that on my PC:

  • If you have username/password combo, you get this 404 error ... this is since few days then.
  • If you have the 3 token, it still works fine

Unfortunately I cannot do anything on my side as I just use the tgtg-python module - so it's good that you already create an issue
Let's see if we can find a way to retrieve those tokens ...

from home_assistant_tgtg.

lampje25 avatar lampje25 commented on August 15, 2024

same problems here.
this morning it still worked.
Not anymore unfortunately.

Traceback (most recent call last):
File "C:\Python39\tgtg_get_tokens.py", line 15, in
client.get_items()
File "C:\Python39\tgtg_init_.py", line 151, in get_items
self.login()
File "C:\Python39\tgtg_init_.py", line 130, in login
raise TgtgLoginError(response.status_code, response.content)
tgtg.exceptions.TgtgLoginError: (404, b'')

from home_assistant_tgtg.

groenmarsmannetje avatar groenmarsmannetje commented on August 15, 2024

Since yesterday I also get 404 errors, but I was already using the tokens.
So that also seems to have been blocked.

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

@groenmarsmannetje Indeed, I can also reproduce this issue ... Another issue has been registered on the upstream module regarding this: ahivert/tgtg-python#124
Hopefully we'll be able to find a way to log in 🤞

from home_assistant_tgtg.

wieluk avatar wieluk commented on August 15, 2024

upstream got fixed with version 0.8 it works like this for me:

client = TgtgClient(email="[email protected]")
tgtg_id = client.get_credentials()
client = TgtgClient(access_token=tgtg_id['access_token'], refresh_token=tgtg_id['refresh_token'], user_id=tgtg_id['user_id'])
client.login() 

unfortunately you get a email to accept the login every time. So we have to try to use tokens as long as they work and then retry with email.

edit:
It doesn't work again ... throwing 403 error and wants captcha.
ahivert/tgtg-python#119 (comment)

from home_assistant_tgtg.

groenmarsmannetje avatar groenmarsmannetje commented on August 15, 2024

Yes I got it also working again after I updated the version number in manifest file.

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Awesome! I'll work on it later today and push an update

from home_assistant_tgtg.

Chouffy avatar Chouffy commented on August 15, 2024

Hi all, the new release should fix the login issue: now it's with token only. Check out the Readme for more info!

from home_assistant_tgtg.

nepozs avatar nepozs commented on August 15, 2024

It does not help - email is redirecting to link looking like:

https://space.toogoodtogo.com/login/accept/12345687/1cbc122b-b112-191c-860d-f1e2b70b2f67
but script ends like this:

Type your email linked to your TGTG account: my_email@here
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Check your mailbox on PC to continue... (Mailbox on mobile won't work, if you have installed tgtg app.)
Traceback (most recent call last):
  File "c:/ha/tgtg_tokens.py", line 11, in <module>
    tgtgClient.get_credentials()
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\tgtg\__init__.py", line 67, in get_credentials
    self.login()
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\tgtg\__init__.py", line 139, in login
    self.start_polling(first_login_response["polling_id"])
  File "C:\Users\USER\AppData\Local\Programs\Python\Python38\lib\site-packages\tgtg\__init__.py", line 182, in start_polling
    raise TgtgPollingError(
tgtg.exceptions.TgtgPollingError: Max retries (120 seconds) reached. Try again.

UPDATE
It does not work with firefox but chrome is OK.

from home_assistant_tgtg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.