yatsenkolesh / instagram-nodejs

Simple library for auth, get followers, search by hashtags and locations, like posts, follow, get user feed of instagram with nodejs
MIT License
317 stars 74 forks source link

Can't get CSRF #31

Open yogiw opened 6 years ago

yogiw commented 6 years ago

I used this code

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

Instagram = new Instagram()

Instagram.getCsrfToken() .then((csrf) => { Instagram.csrfToken = csrf; console.log(csrf) }).then(() => { Instagram.auth('----', '-----').then(sessionId => {

Instagram.sessionId = sessionId

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

}) })`

it's always logged empty string ("").

yatsenkolesh commented 6 years ago

Hello. Please check this in 1.0.0 version.

yatsenkolesh commented 6 years ago

It's working ? Your issue is resolved ?

yogiw commented 6 years ago

Isn't resolved yet. When I log the Instagram, It's returned undefined.

yatsenkolesh commented 6 years ago

what version of package do u use ?

yogiw commented 6 years ago

"instagram-nodejs-without-api": "^1.0.0",

Or maybe I did something wrong?

yatsenkolesh commented 6 years ago

Yeah. This is problem and I will resolve it soon.

yatsenkolesh commented 6 years ago

We are fixed! I updated the version. Try to use 1.0.3, but if u will have challenge required exception - push me.

yogiw commented 6 years ago

Yeah, I got the CSRF but It's always said that the authentication was error and challange required. what is that?

yildirimatcioglu commented 6 years ago

same issue.

yildirimatcioglu commented 6 years ago

I can get token but can not get sessionId, it says "Instagram authentication failed (challenge required erro)"

yatsenkolesh commented 6 years ago

@yogiwisesa try to change account or auth from a web interface. Instagram is changing API and we should prepare functional for instagram challenges.

yogiw commented 6 years ago

I changed my password, but still isn't working.