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.

Unable to resolve "this was me" challenge with ig.challenge.auto(true)

See original GitHub issue

So I’ve looked through all the issues and examples and I still cannot get this to work so sorry if I am missing something simple. I am successfully able to login with two of my accounts with no challenges necessary, but I get IgCheckpointError on a friend’s account that I am trying to use. I am using a third party proxy with all of my requests. My code looks like so:

console.log('request received...')
  ig = new IgApiClient();
  ig.state.generateDevice(username);
  // apply agent class to request library defaults
  ig.request.defaults.agentClass = shttps;
  ig.request.defaults.agentOptions = {
    // @ts-ignore
    socksHost: '@@@', // proxy hostname
    socksPort: 0000,
    socksUsername: '0000',
    socksPassword: '000',
  };

  console.log("authenticating...");
  bluebird.try(async () => {
    process.nextTick(async () => await ig.simulate.postLoginFlow());
    auth = await ig.account.login(username, password);
    console.log("successfully authenticated")
    generateFollowers(response)

  }).catch(IgCheckpointError, async () => {
    console.log("authentication requires challenge...");
    console.log("checkpoint info:");
    console.log(ig.state.checkpoint);
    console.log(await ig.challenge.auto(true));
    console.log("challenge info:");
    console.log(ig.state.checkpoint);
    // const { code } = await inquirer.prompt([
    //   {
    //     type: 'input',
    //     name: 'code',
    //     message: 'Enter code',
    //   },
    // ]);
    // console.log(await ig.challenge.sendSecurityCode(code));
    console.log("successfully authenticated!")
    generateFollowers(response)
  })

As you can see I have commented out the sendSecurityCode part of it because I am not receiving a code and the ig.state.checkpoint is null at that point. I have tried with and without the security code part and nothing seems to work, and I usually get ‘Unhandled rejection IgResponseError: POST /api/v1/challenge/reset/3662491500/iOHcynqQAa/ - 500 Internal Server Error;’

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:10

github_iconTop GitHub Comments

8reactions
romshiricommented, Oct 16, 2019

Having the same issue. Does anyone have a solution or a way to workaround this?

0reactions
Nerixyzcommented, Mar 31, 2020

This thread has been inactive for a long time now, so it will be closed. If this is still an issue, reopen it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix Challenge Required Instagram Error (Dec 2022)
Another easy solution is to clear the cache. You can do so directly from your phone settings.
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 >
Bonuses on Instagram - Instagram Help Center
Bonuses are opportunities for you to earn money directly from Instagram. If you qualify to earn a bonus, you'll be notified in the...
Read more >
How to Fix Instagram Challenge Required Error On iPhone ...
Let's show you how to fix the Instagram error " Challenge Required" on your iPhone. In this video, I walk you through the...
Read more >
Job Interview Question: "How Do You Handle a Challenge?"
Most importantly, you want to be able to discuss a real professional challenge or problem, not an arbitrary or annoying occurrence.
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