Instagram-php-scraper: login error on remote host

Created on 26 Sep 2020  路  12Comments  路  Source: postaddictme/instagram-php-scraper

Hello,

the script works fine in my localhost but when I try to login on my remote host it give me this error

Fatal error: Uncaught InstagramScraperExceptionInstagramAuthException: $twoStepVerificator must be an instance of TwoStepVerificationInterface.
......
: InstagramScraperInstagram->login() #2 {main} thrown in

All 12 comments

i have this problam too

Up

Same here,

PHP Fatal error:  Uncaught InstagramScraper\Exception\InstagramAuthException: $twoStepVerificator must be an instance of TwoStepVerificationInterface. in /var/www/html/ig/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php:1783
Stack trace:
#0 /var/www/html/ig/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php(1683): InstagramScraper\Instagram->verifyTwoStep(Object(Unirest\Response), Array, NULL)
#1 /var/www/html/ig/index.php(114): InstagramScraper\Instagram->login()
#2 {main}
  thrown in /var/www/html/ig/vendor/raiym/instagram-php-scraper/src/InstagramScraper/Instagram.php on line 1783

Instagram added some kind of 2 step login verification since 26.9.2020. Login using this php lib seems to be "suspicious".

I see here, that there were some "twoStep" login binds. It this issue already fixed in code?

孝邪泻邪褟 卸械 斜械写邪. 效褌芯 写械谢邪褌褜?

some idea?

I've also had this problem. Any ideas? Have Instagram changed something? Thanks.

No!
Update some lib and OK

word "some" makes your answer useless

same problem here

I have this issue too, any progress on a fix?

having same issue. Unsure what to add to init test file. Project structure a little confusing to get setup

Probably, Instagram has marked your account as suspicious, or you are logging in from a non-standard location. There are three solutions to this problem:

  1. You have to use InstagramScraperInstagram::login(false, true). Second flag (true) enables two step verification. You need to enter the code to console after it is sent.

  2. Use function $instagram->setUserAgent($userAgent);, enter the useragent you usually use to login in instagram. Also check example file https://github.com/postaddictme/instagram-php-scraper/blob/master/examples/setCustomCookies.php. For more complex work with this scraper you have to save coockies and set custom in each login.

  3. Check this file, if you need security code by email auto comfirm. https://github.com/postaddictme/instagram-php-scraper/blob/master/examples/twoStepAutoVerification/loginWithEmailAutoCponfirm.php

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joty0 picture joty0  路  3Comments

jakerator picture jakerator  路  5Comments

alabamaster picture alabamaster  路  6Comments

JOniiX picture JOniiX  路  6Comments

juangrimm picture juangrimm  路  8Comments