instagrapi icon indicating copy to clipboard operation
instagrapi copied to clipboard

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

Open tmxd09887 opened this issue 1 year ago • 13 comments

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?

tmxd09887 avatar Jul 09 '24 12:07 tmxd09887

Me too… and Instagram ask to change password

jbosolutions avatar Jul 11 '24 02:07 jbosolutions

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.

tmxd09887 avatar Jul 11 '24 02:07 tmxd09887

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 avatar Jul 11 '24 02:07 jbosolutions

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

jbosolutions avatar Jul 11 '24 02:07 jbosolutions

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

tmxd09887 avatar Jul 11 '24 02:07 tmxd09887

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?

jbosolutions avatar Jul 11 '24 02:07 jbosolutions

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

tmxd09887 avatar Jul 11 '24 02:07 tmxd09887

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

sunmasters avatar Jul 15 '24 02:07 sunmasters

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

tmxd09887 avatar Jul 15 '24 02:07 tmxd09887

Is device data is same?

sunmasters avatar Jul 15 '24 03:07 sunmasters

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.

tmxd09887 avatar Jul 15 '24 03:07 tmxd09887

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

I think you can give user agent as your device?

sunmasters avatar Jul 15 '24 03:07 sunmasters

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.

tmxd09887 avatar Jul 15 '24 03:07 tmxd09887