-
Notifications
You must be signed in to change notification settings - Fork 76
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
Using Tweety in a Flask App #244
Comments
ActionRequired occurs when the login process requires some additional information to complete the login from Twitter. It could have multiple solutions
Can you please post your code snippet for better understanding. |
Thanks for the fast reply here are the relevant parts on how I sign in
Hence, I am trying to host this on cloud I do not want to use cookies or auth_token because we need to check them if they are expired or not and refresh it periodically. Is it possible or sufficient to provide the email address of the account hence it is asking for it in the error message, if yes what should be the format to provide it with extra arg? |
from tweety import TwitterAsync
app = TwitterAsync("session")
try:
await app.sign_in(username, password, extra=extra)
except ActionRequired as e:
action = input(f"Action Required :> {str(e.message)} : ")
await app.sign_in(username, password, extra=action) More about to signing here |
Hey everyone,
I have been trying to use Tweety inside a Flask App for a small project, where I want to help my non-programmer friends searching tweets with a simple WebApp. The app works on my local just fine does it's tasks, but when I deployed it I got the following error and cannot sign in to accounts I used the library to search for tweets. I intentionally hid the username and password.
tweety.exceptions.ActionRequired: Enter your phone number or email address. There was unusual login activity on your account. To help keep your account safe, please enter your phone number (start with country code, e.g. +1) or email address to verify it’s you.
2025-02-26 08:05:32 - twitter_scraper - ERROR - Error with account [username, pwd ]: API call failed
Has anybody got any experience using the library in a hosted backend, how can I avoid getting this error?
The text was updated successfully, but these errors were encountered: