subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.2k stars 666 forks source link

Why do I get ChallengeChoice.EMAIL every time when I log in to get the SMS code? #1969

Open tmxd09887 opened 2 months ago

tmxd09887 commented 2 months ago

got ChallengeChoice.EMAIL

But in fact, I received a login sms verification code

When I entered the SMS code, I got a login error message

And my account is not linked to Email

Is ChallengeChoice set to Email by default? How can I change it back to SMS?

jbosolutions commented 2 months ago

Me too… and Instagram ask to change password

tmxd09887 commented 2 months ago

I guess this is the case. Instagram asked for an SMS verification code, but sent back an email verification code, thus triggering risk control (requiring a password change). The normal process should be to successfully log in after entering the SMS verification code.

jbosolutions commented 2 months ago

Yeah I disabled sms auth. But I can’t disable email auth code… also I don’t know why Instagram ask me to change password, no sense

jbosolutions commented 2 months ago

Do you know how disable all auto codes on Instagram? Did you resolved it?

tmxd09887 commented 2 months ago

sms auth is required by Instagram, I don't think it can be disabled

jbosolutions commented 2 months ago

This is the error I get when I put the verification code in console:

ChallengeResolveMixin.challenge_resolve() takes 2 positional arguments but 3 were given

Maybe because I have another account using Instagrapi in same computer?

tmxd09887 commented 2 months ago

I don't know how to disable it, but there must be something wrong with the verification code processing.

sunmasters commented 2 months ago

It means, you should save session data. Reuse it again to avoid asking OTP again

tmxd09887 commented 2 months ago

It means, you should save session data. Reuse it again to avoid asking OTP again

Hello, this is the first time logging in, there is no existing session data

sunmasters commented 2 months ago

Is device data is same?

tmxd09887 commented 2 months ago

The device is generated by instagrapi, so it is definitely different from the one used when registering. But the key point is that there is a bug in the process of submitting the SMS verification code.

sunmasters commented 2 months ago

Maybe API need update. You have to update in your system .

I think you can give user agent as your device?

tmxd09887 commented 2 months ago

Maybe API need update. You have to update in your system .

I think you can give user agent as your device?

Yes, this could be a way.