📦 jlobos/instagram-web-api: 🤳 Instagram Private Web API client for Node #116
Closed
chriskyfung
started this conversation in
Literature
Replies: 1 comment
-
🤳 Instagram Private Web API client for NodeSimple, easy and very complete implementation of the Instagram private web API.
UsageCall // Packages
const Instagram = require('instagram-web-api')
const FileCookieStore = require('tough-cookie-filestore2')
const { username, password } = process.env // Only required when no cookies are stored yet
const cookieStore = new FileCookieStore('./cookies.json')
const client = new Instagram({ username, password, cookieStore })
;(async () => {
// URL or path of photo
const photo =
'https://scontent-scl1-1.cdninstagram.com/t51.2885-15/e35/22430378_307692683052790_5667315385519570944_n.jpg'
await client.login()
// Upload Photo to feed or story, just configure 'post' to 'feed' or 'story'
const { media } = await client.uploadPhoto({ photo: photo, caption: 'testing', post: 'feed' })
console.log(`https://www.instagram.com/p/${media.code}/`)
})() API ReferencegetUserByUsername(params)const instagram = await client.getUserByUsername({ username: 'instagram' })
const me = await client.getUserByUsername({ username: client.credentials.username })
getChallenge(params)await client.getChallenge({ challengeUrl: '/challenge/1284161654/a1B2c3d4E6/' })
updateChallenge(params)const challengeUrl = '/challenge/1284161654/a1B2c3d4E6/'
await client.updateChallenge({ challengeUrl, choice: 0 })
await client.updateChallenge({ challengeUrl, securityCode: 123456 })
resetChallenge(params)await client.resetChallenge({ challengeUrl: '/challenge/1284161654/a1B2c3d4E6/' })
replayChallenge(params)await client.replayChallenge({ challengeUrl: '/challenge/1284161654/a1B2c3d4E6/' })
getMediaByShortcode(params)const media = await client.getMediaByShortcode({ shortcode: 'BQE6Cq2AqM9' })
getPhotosByUsername(params)await client.getPhotosByUsername({ username: 'unicorn' })
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Package name:
instagram-web-api
GitHub repo: https://github.com/jlobos/instagram-web-api
Description:
Beta Was this translation helpful? Give feedback.
All reactions