Socket
Socket
Sign inDemoInstall

instagram-nodejs-without-api

Package Overview
Dependencies
16
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    instagram-nodejs-without-api

Auth and get followers on instagram with nodejs


Version published
Maintainers
1
Install size
1.34 MB
Created

Readme

Source

instagram-nodejs

Auth and get followers on instagram with nodejs
License - BSD-3-Clause
Important : you must update csrf token and sessionId only if password was changed
yarn add instagram-nodejs-without-api
You can get instagram followers with next code:
Instagram = new Instagram()


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

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

  })
})

Follow/unfollow

Inst = new Instagram()

Inst.csrfToken = 'your-csrf'
Inst.sessionId = 'your-session-id'
Inst.follow(3,0) //follow "kevin"
Inst.follow(3, 1) //unfollow "kevin"

You can get user id with Inst.getUserDataByUsername() method

Star this repository on github, please. Thank you

Keywords

FAQs

Last updated on 16 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc