jlobos / instagram-web-api

🤳 Instagram Private Web API client for Node
https://npmjs.com/instagram-web-api
MIT License
1.12k stars 186 forks source link

403 Error #255

Closed keremsirin closed 1 year ago

keremsirin commented 3 years ago

Hi, firstly thanks for the repo. I tried to use the getUserByUserName method and it works clearly but when I try to get data over and over it says UnhandledPromiseRejectionWarning: StatusCodeError: 403 - {"message":"Please wait a few minutes before you try again.","status":"fail"}

PS: I am authenticating with an account that I just created 2 days ago.

Here is my code:

const Instagram = require('instagram-web-api')
const username = 'xxxxxx'
const password = 'xxxxxx'

const client = new Instagram({ username, password })
const userName = 'instagram'
;(async () => {
  await client.login()
  const profile = await client.getUserByUsername({ username: userName })
  console.log(profile)
  await client.logout()
})()
MonsieurBibo commented 3 years ago

See #216 #238 #239