TweeterPy is a python library to extract data from Twitter. TweeterPy API lets you scrape data from a user's profile like username, userid, bio, followers/followings list, profile media, tweets, etc.
I had this happen today where I was asked to enter the backup code. Again, like #77 , this should be able to be passed through the login function().
Might want to add a warning though. AFAIK backup codes can only be used once. Unfortunately for this account it now cannot be accessed. I'm not sure exactly what happened but it seems like the 2FA got removed/disabled on the account, which prompted the backup code. Perhaps we this occurs we can generate a new backup code via the API and pass it back to the user.
{
"flow_token": "xxxxxxx",
"status": "success",
"subtasks": [
{
"subtask_id": "LoginTwoFactorAuthChallenge",
"enter_text": {
"header": {
"primary_text": {
"text": "Enter your backup code",
"entities": []
},
"secondary_text": {
"text": "Enter your backup code below.",
"entities": []
},
"user": {"removed": "removed"}
},
"detail_text": {
"text": "Choose a different verification method\n\nContact X Support",
"entities": [
{
"from_index": 0,
"to_index": 38,
"navigation_link": {
"link_type": "subtask",
"link_id": "choose_different_method",
"label": "choose_methods_link",
"subtask_id": "LoginTwoFactorAuthChooseMethod"
}
},
{
"from_index": 40,
"to_index": 57,
"navigation_link": {
"link_type": "chromeless_web_link",
"link_id": "login_issues_link",
"url": "https://help.twitter.com/forms/account-access/regain-access"
}
}
]
},
"hint_text": "Enter code",
"multiline": false,
"auto_capitalization_type": "none",
"auto_correction_enabled": false,
"keyboard_type": "text",
"next_link": {
"link_type": "task",
"link_id": "next_link",
"label": "Next"
}
},
"subtask_back_navigation": "cancel_flow"
},
{
"subtask_id": "LoginTwoFactorAuthChooseMethod",
"choice_selection": {
"selection_type": "single_select",
"choices": [
{
"id": "0",
"text": {
"text": "Use a backup code",
"entities": []
}
}
],
"primary_text": {
"text": "Choose a different verification method",
"entities": []
},
"next_link": {
"link_type": "task",
"link_id": "next_link",
"label": "Next"
},
"style": "default",
"sections": []
},
"subtask_back_navigation": "cancel_flow"
},
{
"subtask_id": "login_security_key_not_supported_cta",
"cta": {
"header": {
"primary_text": {
"text": "Why can’t you log in using a security key?",
"entities": []
},
"secondary_text": {
"text": "You can log in to twitter.com with a security key only when using a compatible web browser. Currently, the X mobile app doesn't support the use of security keys. ",
"entities": []
}
},
"primary_action_link": {
"link_type": "subtask",
"link_id": "choose_different_method",
"label": "Next",
"subtask_id": "LoginTwoFactorAuthChooseMethod"
},
"text_alignment": "left",
"primary_action_style": "primary",
"secondary_action_style": "secondary",
"style": "scrollable"
}
}
]
}
I had this happen today where I was asked to enter the backup code. Again, like #77 , this should be able to be passed through the login function().
Might want to add a warning though. AFAIK backup codes can only be used once. Unfortunately for this account it now cannot be accessed. I'm not sure exactly what happened but it seems like the 2FA got removed/disabled on the account, which prompted the backup code. Perhaps we this occurs we can generate a new backup code via the API and pass it back to the user.