Answer the question
In order to leave comments, you need to log in
How to solve "Challenge required" in mgp25/instagram-api?
Hello.
I implement authorization in Instagram using PrivateAPI and an extension from mgp25 - https://github.com/mgp25/Instagram-API.
When authorizing from a new IP - insta responds with "Challenge required", which means that you need to enter a confirmation code from SMS or email.
I found the most complete analysis of the problem in this issue - https://github.com/mgp25/Instagram-API/issues/2143.
Following this answer ( https://github.com/mgp25/Instagram-API/issues/2143...implemented the functionality and now in case of a response with a request to enter a code, another request is programmatically emulated, an SMS arrives on the phone, I enter it (moreover, entering the code incorrectly leads to an error - i.e. at this moment everything is correct) and I receive a message about successful authorization - the user's pk and other data come in the response.
The problem is that when I call the method again, I get prompted for input again. Those. the library does not save a successful entry, or something still comes up wrong.
I ask for help in resolving the issue - a lot of time was spent looking for a solution.
Thanks in advance.
Answer the question
In order to leave comments, you need to log in
There is a simpler solution than enabling/disabling two-factor authentication. Subscribe if this is still relevant to you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question