D
D
Dmitry Tarasov2019-10-25 14:39:59
PHP
Dmitry Tarasov, 2019-10-25 14:39:59

How to resolve Challenge required. in mgp25/instagram-api?

Hello everyone.
I implement authorization in Instagram using PrivateAPI and an extension from mgp25 - github.com/mgp25/Instagram-API
I get the following error.
InstagramAPI\Response\LoginResponse: Challenge required.
I bought a proxy, one was mega anonymous that I didn’t even recognize Instagram, then I bought Moscow time, as a result, Instagram thought that I was in Azerbaijan.
Krch, I set the proxy both on the phone and in the browser, I logged in from this proxy, then I made requests from the site, also from the proxy.
Krch, nothing helps at all, I'm looking at all sorts of questions related to this, I've already dug everything up.
two factor authentication disabled
code below

require __DIR__.'/class/vendor/autoload.php';

$login = "user";
$pass = "pass";
\InstagramAPI\Instagram::$allowDangerousWebUsageAtMyOwnRisk = true;
$ig = new \InstagramAPI\Instagram();
$ig->setProxy('socks5://fattwwq:[email protected]:80');
$ig->login($login, $pass);

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
doublench21, 2019-10-25
@fast-je

Turn on two-factor. On the next such attempt, it will send a confirmation code. This lib will ask him to enter. After that, you can turn off the two-factor.

N
Nikita, 2019-10-25
@Extar93

It happened to me after I fed him a proxy, and then logged in from the ip of the server, which is located in another country, relative to the proxy. Login with a proxy in the browser can help, or rather it helped me. And then for some reason it stopped. This lib saves cookies and other information to a folder, try deleting it

P
Puma Thailand, 2019-10-26
@opium

so you look at what challenge it is, is it me or is there a six-digit

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question