ahivert/tgtg-python

error 404

Closed this issue ยท 20 comments

Hello,

I am already a user of tgtg bot but from anotehr repo. Unfortunatly it stopped working due to login changes. I was looking then for another repo that did the same and came to yourse.
I installed everything correctly, but when launching to get my favorite items i am stuck with a 404 error on login. I've seen that everyone is getting 403 error but for me it is a 404. Did I something wrong or ? ...

image
image

same issue

Mine is working fine for a few days...

@Dielee when you do the first setup before 32 hours ago, everything is fine...after that tgtg changed there api

But 0.7.0 fixes the new api ?

yes, 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.

0.7.0 works with token if you have them, else email and password not

Ah, thanks for this info! I will try to create an new tgtg account to test this :)

Ah, thanks for this info! I will try to create an new tgtg account to test this :)

no need to create new account, just log off, and relog into the app and you'll see.

you'll recieve an email like this:
image

Yes, sure, but my bot is working now. I don't want to try this with my real acc.

0.7.0 works with token if you have them, else email and password not

I would add that this is since only few days. On 15 November I was able to connect with user/password and retrieve my tokens using 0.7.0 ... So now we need to retrieve the token in other means ๐Ÿ™ƒ

I have build a new version witch works with the new endpoints.
You have to use only Tgtgclient with an email:

TgtgClient(email="dqweds@yourmail.de")
tgtgclient.login()

After loging in, you should get an email.
Klick on this link and your good to go ;)
PS: You have 2 Minutes to click this Link!

Changes are here:
https://github.com/Dielee/tgtg-python

Please give me feedback. If this works, I will open an PR.

I have build a new version witch works with the new endpoints. You have to use only Tgtgclient with an email:

TgtgClient(email="dqweds@yourmail.de") tgtgclient.login()

After loging in, you should get an email. Klick on this link and your good to go ;) PS: You have 2 Minutes to click this Link!

Changes are here: https://github.com/Dielee/tgtg-python

Please give me feedback. If this works, I will open an PR.

looks like working ok, but gives an error with 200 status? 200 means ok? ...
image

EDIT:
@Dielee
i see that there is one veriable not defined: and please make so we can put issues on your repo, so we don't mix both repos. ty
image

Fixed the wrong exception, but in the edit, there is someting wrong with your clone.
We are not using this endpoint anymore..

ut in the edit, there is someting wrong with your clone

i'll retry. it's juste intellij taht is informing that variable doesn't exist and it is in your repo.
https://github.com/Dielee/tgtg-python/blob/master/tgtg/__init__.py#L251
But please make so we can open issues on your repo to avoid discussing irelevant thing here about your repo and not the issue here discussed

Thanks for this hint, issues are now open!

Your nez commit did the trick, it is working fine! congratz!
Dielee@a4bd08d

what you need to do in oprder to work just log in 1 time, retrieve tokens and login each time with those tokens, no need to activate by email

xixov commented

@Dielee thanks for providing a fix! I tested your code and I get a KeyError: 'polling_id' error once the login request comes back (line polling_id = first_login_response["polling_id"]). I checked response.json and it gave me only {'state': 'TERMS'}

Please open up an issue at the forked repo!

New release 0.8.0 should fix that, implemented by @Dielee

If there is still an error with new release 0.9.0 please reopen the issue