Open jimmyxp01 opened 2 years ago
instagrapi.exceptions.ChallengeRequired: challenge_required
appears when a user is trying to access their Instagram account via the web rather than the app, or when you are trying to login to your account from a new unrecognised device. log in to the account via app and accept the challenge or check your mails.
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/media/configure_to_clips/?video=1
is only the exception which results from not being able to do actions.
I'm with the same issue here. I'm accepting the challenge with the app but still having these error requests.exceptions.HTTPError: 400 Client Error: Bad Request for url:
I found something that works for me: Add this before your login:
def challenge_code_handler(username, choice):
if choice == ChallengeChoice.SMS:
return get_code_from_sms(username)
elif choice == ChallengeChoice.EMAIL:
return get_code_from_email(username)
return False
cl = Client()
cl.challenge_code_handler = challenge_code_handler
Then, click on cl.login and search for Xiaomi. Then, change parameters android_release, manufacturer, and model to your mobile's settings (for example my phone's android release is 12.0.0, the manufacturer is Samsung and the model is SM-G780G). I hope it works for you too.
I'm using Ubuntu,
Error:
Note: This file working 2 days ago but now it's not working