Created
July 6, 2019 18:14
-
-
Save Nerixyz/36b3928b81819fe8b755d1a09e2649b1 to your computer and use it in GitHub Desktop.
insta-api-demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const IgApiClient = require('instagram-private-api').IgApiClient; | |
| const ig = new IgApiClient(); | |
| ig.state.generateDevice(process.env.IG_USERNAME); | |
| // you'll have to define IG_USERNAME and IG_PASSWORD | |
| (async ()=>{ | |
| const response = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD); | |
| console.log(response); | |
| })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "insta-api-demo", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": {}, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "instagram-private-api": "^1.16.0" | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment