title: NPM instagram-web-api checkpoint required
body: <p>I have configured the NPM instagram-web-api package. I have instantiated the Instagram object and passed the correct credentials:</p>
  <pre><code>const Instagram = require('instagram-web-api');
  const { igUsername, igPassword } = process.env
  const ig = new Instagram({ username: igUsername, password: igPassword });
  
  (async () =&gt; {
  
    try {
      await ig.login()
    } catch (err) {
      if (err.error &amp;&amp; err.error.message === 'checkpoint_required') {
        console.log(err.error);
        const challengeUrl = err.error.checkpoint_url
        await ig.updateChallenge({ challengeUrl, securityCode: 670381 })
      }
    }
  
    const profile = await ig.getProfile()
  })()
  </code></pre>
  <p>I am getting a 'checkpoint_required' error message and each time I start the server a Instagram verification code is sent to my email. I don't know where to enter that code or how to resolve this issue.</p>