Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i cant get it to work #34

Open
poomkusa opened this issue Aug 12, 2018 · 22 comments
Open

i cant get it to work #34

poomkusa opened this issue Aug 12, 2018 · 22 comments

Comments

@poomkusa
Copy link

poomkusa commented Aug 12, 2018

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.

@kimaldis
Copy link

FWIW, I get the same. with the added information that both csrf & sessionID are undefined. Any thoughts? I'm also a little green in this area.

@aidv
Copy link
Contributor

aidv commented Aug 16, 2018

I have reverse engineered whatever it is that Instagram is doing for a few days now and I've fixed whatever is needed to log in, now I need the developer to let me push a commit.

Whatever needs to be done after that is up to everybody else to figure out.

@yatsenkolesh OD, wanna let me push?

@aidv
Copy link
Contributor

aidv commented Aug 17, 2018

I have forked and updated the code https://github.com/aidv/instagram-nodejs

@yatsenkolesh
Copy link
Owner

@aidv please, create a pull request.

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

@yatsenkolesh np, I did yesterday I think

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

I'm sorry I'm new to the whole Git thing. I'm using GitKraken

@yatsenkolesh
Copy link
Owner

Maybe I can help you:

  1. try to clone this repo
  2. create a new branch
  3. apply your changes
  4. make git push

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

@yatsenkolesh thank you, but it says Push failed - Access denied

@yatsenkolesh
Copy link
Owner

you are pushed own branch or to master ?

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

On my own. I need access somehow, or just download instagram.js from my repo and upload it.
These are my changed:

  • Updated Agent
  • Parsing CSRF and Rollout Hash
  • Extract several values from response headers to use in future requests

@yatsenkolesh
Copy link
Owner

Sorry, please make screenshot, when you pushing to own branch

@yatsenkolesh
Copy link
Owner

Its should works

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

@yatsenkolesh
Copy link
Owner

I have a solution. Visit you fork and click to "Pull request" button

screen shot 2018-08-19 at 12 24 14 am

@aidv
Copy link
Contributor

aidv commented Aug 18, 2018

Done

@yatsenkolesh
Copy link
Owner

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

@yildirimatcioglu
Copy link

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

@yatsenkolesh
Copy link
Owner

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

@yildirimatcioglu
Copy link

how can I change auth ? I didnt understand it

@yatsenkolesh
Copy link
Owner

Sorry, I mean - change account

@yildirimatcioglu
Copy link

its still same ?

@oplusplus
Copy link

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

same thing happening here! please any help??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants