instagram-nodejs: i cant get it to work

i installed the package, then used this code:

let Instagram = require('instagram-nodejs-without-api');
Instagram = new Instagram()


Instagram.getCsrfToken().then((csrf) =>
{
  Instagram.csrfToken = csrf;
}).then(() =>
{
  return Instagram.auth('inst-your-username', 'inst-your-password').then(sessionId =>
  {
    Instagram.sessionId = sessionId

    return Instagram.getUserDataByUsername('username-for-get').then((t) =>
    {
      return Instagram.getUserFollowers(t.graphql.user.id).then((t) =>
      {
        console.log(t); // - instagram followers for user "username-for-get"
      })
    })

  })
}).catch(console.error);

i changed three parameters: ‘inst-your-username’, ‘inst-your-password’, and ‘username-for-get’ to my own, then get this error: image

not sure if im doing this right, not a very solid background here. any help or suggestion to documentation/link/example i should learn would be appreciated.

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Comments: 22 (17 by maintainers)

Most upvoted comments

“Instagram authentication failed (challenge required erro)”, at 1.0.3 I can get token but can not get sessionId