Skip to content

Can't login with checkpoint challenge Bypass #384

@dhkim77000

Description

@dhkim77000

Version(s) affected: 7.0.0

Description

While trying to log in, I encountered an error: ERROR: checkpoint_required. This error message appears.

Stack trace:
#0 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Checkpoint/Challenge.php(76): json_decode(NULL)
#1 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Login.php(196): Instagram\Auth\Checkpoint\Challenge->fetchChallengeContent()
#2 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Login.php(109): Instagram\Auth\Login->checkpointChallenge(Object(GuzzleHttp\Cookie\CookieJar), Object(stdClass))
#3 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Api.php(177): Instagram\Auth\Login->process()
#4 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/jobs/login_test.php(41): Instagram\Api->login('ethan.martin197', 'Testest123', Object(Instagram\Auth\Checkpoint\ImapClient))
#5 {main}
  thrown in Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Checkpoint/Challenge.php on line 76

Fatal error: Uncaught TypeError: json_decode(): Argument #1 ($json) must be of type string, null given in Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Checkpoint/Challenge.php:76
Stack trace:
#0 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Checkpoint/Challenge.php(76): json_decode(NULL)
#1 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Login.php(196): Instagram\Auth\Checkpoint\Challenge->fetchChallengeContent()
#2 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Auth/Login.php(109): Instagram\Auth\Login->checkpointChallenge(Object(GuzzleHttp\Cookie\CookieJar), Object(stdClass))
#3 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/src/Instagram/Api.php(177): Instagram\Auth\Login->process()
#4 Instagram_reels_php/php/vendor/pgrimaud/instagram-user-feed/jobs/login_test.php(41): Instagram\Api->login('ethan.martin197', 'Testest123', Object(Instagram\Auth\Checkpoint\ImapClient))

How to reproduce

<?php

declare(strict_types=1);
use GuzzleHttp\Client;
use Instagram\Api;
use Instagram\Exception\InstagramException;
use Instagram\Auth\Checkpoint\ImapClient;
use Psr\Cache\CacheException;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;

require realpath(dirname(__FILE__)) . '/../utils/autoload.php';
$credentials = include_once realpath(dirname(__FILE__)) . '/../utils/credentials.php';

$cachePool = new FilesystemAdapter('Instagram', 0, __DIR__ . '/../cache');

try {
    $proxy = $argv[3];

    if ($proxy !== null) {

        $client = new Client([
            'proxy' => [
                'https' => $proxy
            ]
        ]);
        $api = new Api($cachePool, $client);
    } else {
        $api = new Api($cachePool);
    }

    $insta_account_id = $argv[1];
    $insta_password = $argv[2];
    $api = new Api($cachePool);


    $credentials->setLogin($insta_account_id);
    $credentials->setPassword($insta_password);


    $imapClient = new ImapClient($credentials->getImapServer(), $credentials->getImapLogin(), $credentials->getImapPassword());
    $api->login($credentials->getLogin(), $credentials->getPassword(), $imapClient);
    } catch (InstagramException $e) {
    echo "ERROR: " . $e->getMessage() . PHP_EOL;
} catch (CacheException $e) {
    echo "ERROR: " . $e->getMessage() . PHP_EOL;
}

Additional context
Some accounts are working but all of the newly created accounts are not working.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions