question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

challenge_required Stuck/Looping (it was me) SOLVED

See original GitHub issue

Form

Put an [x] if you meet the condition, else leave [ ].

  • [ x] I’ve searched the Issues
  • [ x] I’ve read the basic concepts
  • [ x] I’m using the latest version

Question

Why i’m stuck in looping challenge_required ? i always click it was me Button. but after login again stuck in challenge_required again.

How to auto click It Was Me or to Solve this challenge?

Code

A meaningful section of your code (else delete this). If you are using TypeScript replace js with typescript.

const { IgApiClient, IgCheckpointError } = require('instagram-private-api');
const Bluebird = require('bluebird');
const inquirer = require('inquirer');

/**
 * This method won't catch all checkpoint errors
 * There's currently a new checkpoint used by instagram which requires 'web-support'
 */

(async () => {
  const ig = new IgApiClient();
  ig.state.generateDevice('user');
  Bluebird.try(async () => {
    const auth = await ig.account.login('user', 'pw');
    console.log(auth);
  }).catch(IgCheckpointError, async () => {
    console.log(ig.state.checkpoint); // Checkpoint info here
    await ig.challenge.auto(true); // Requesting sms-code or click "It was me" button
    console.log(ig.state.checkpoint); // Challenge info here
    const { code } = await inquirer.prompt([
      {
        type: 'input',
        name: 'code',
        message: 'Enter code',
      },
    ]);
    console.log(await ig.challenge.sendSecurityCode(code));
  }).catch(e => console.log('Could not resolve checkpoint:', e, e.stack));
})();

Error and Output

{
  message: 'challenge_required',
  challenge: {
    url: 'https://i.instagram.com/challenge/7536877086/C5B3T4qlLZ/',
    api_path: '/challenge/7536877086/C5B3T4qlLZ/',
    hide_webview_header: true,
    lock: true,
    logout: false,
    native_flow: true
  },
  status: 'fail',
  error_type: 'checkpoint_challenge_required'
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

6reactions
areltiyancommented, Sep 30, 2020

@tomopan

maybe you can test this

that code you can get from Email or SMS

const { IgApiClient, IgCheckpointError } = require('instagram-private-api');
const Bluebird = require('bluebird');
const inquirer = require('inquirer');

/**
 * This method won't catch all checkpoint errors
 * There's currently a new checkpoint used by instagram which requires 'web-support'
 */
const IG_USER = '';
const IG_PW = '';

(async () => {
  const ig = new IgApiClient();
  ig.state.generateDevice(IG_USER);
  Bluebird.try(async () => {
    const auth = await ig.account.login(IG_USER, IG_PW);
    console.log(auth);
  }).catch(IgCheckpointError, async () => {
    console.log(ig.state.checkpoint); // Checkpoint info here
    await ig.challenge.selectVerifyMethod(1, false); //1. Email 0. SMS  send code OTP
    console.log(ig.state.checkpoint); // Challenge info here
    console.log(chalk.green('[+++] Check OTP Email'))
    const { code } = await inquirer.prompt([
      {
        type: 'input',
        name: 'code',
        message: 'Enter code',
      },
    ]);
    console.log(await ig.challenge.sendSecurityCode(code));
  }).catch(e => console.log('Could not resolve checkpoint:', e, e.stack));
})();
1reaction
icodeforlovecommented, Aug 25, 2020

also change the

  ig.state.generateDevice(...);
Read more comments on GitHub >

github_iconTop Results From Across the Web

"challenge required" loop... Is my account perm disabled? Can ...
I 'm stuck in this hell loop too. Can't access the website as I have to verify in the app. I didn't have...
Read more >
Instagram Error Challenge Required – What to Do - Alphr
1. One of the first things to try is checking for Instagram outages. The best way to do that is by visiting Instagram's...
Read more >
How to Fix Challenge_Required Login Error on Instagram
The resolution to this error is pretty simple and straightforward. All you have to do is log in to Instagram using the app...
Read more >
How to Fix Challenge Required Instagram Error (Dec 2022)
Learn how to fix the challenge required Instagram error here! The challenge required message on Instagram usually happens when you change your phone....
Read more >
How to get out of the challenge verification loop on Instagram?
it ig new algo change , no programmer solved it yet and those that do ant saying nothink... i ant noticed anybody saying...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found