Skip to content
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

Encountering tweety.exception_.ActionRequired exception repeatedly #183

Open
efemuratucarli opened this issue Apr 21, 2024 · 10 comments
Open

Comments

@efemuratucarli
Copy link

Hello, I have used tweety with an account successfully. After exceeding rate limit with that account I have tried to use tweety with an another account (a new one) but I could not manage to use it with the new account. tweety.exceptions_.ActionRequired exception occurs repeatedly. After this exception, I can log into the account with email verification manually but then, when I try to relogin to the account, twitter does not ask for email verification.

How can I solve this problem ?
(I am already using a good proxy)

@mahrtayyab
Copy link
Owner

Are you using same session name for both accounts?

@efemuratucarli
Copy link
Author

I was using same session name. Now, I have changed the session name of the new one but the same exception occurs.

@mahrtayyab
Copy link
Owner

ActionRequired occurs when when logging in to Twitter/X and it require some information like OTP etc. Are you acting on that?

@efemuratucarli
Copy link
Author

I have opened another new Twitter account but ActionRequired occured again. So, I can not use tweety. How can I solve this problem ? (I did not change any of the settings of the Twitter account. After opening the account, I have tried to use it with tweety but ActionRequired occured.

@mahrtayyab
Copy link
Owner

ActionRequired occurs when when logging in to Twitter/X and it require some information like OTP etc. Are you acting on that?

can you please confirm this?

@mahrtayyab
Copy link
Owner

from tweety import Twitter

app = Twitter("session")
try:
    app.sign_in(username, password, extra=extra)
except ActionRequired as e:
    action = input(f"Action Required :> {str(e.message)} : ")
    app.sign_in(username, password, extra=action)

@efemuratucarli
Copy link
Author

Twitter asks for the email address as an action. I have given the email address as the value of extra parameter of sign_in function but now it returns InvalidCredentials exception.

@mahrtayyab
Copy link
Owner

Use .start method instead of sign_in, InvalidCredentials after ActionRequired means you have entered wrong email

@efemuratucarli
Copy link
Author

I have entered the correct email and used .start method but still getting InvalidCredentials in two different accounts.

@mahrtayyab
Copy link
Owner

mahrtayyab commented Jun 2, 2024

Improved start method in latest update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants