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

getUserByUsername requires authentication for public profiles (valid username & password) #59

Open bryanvaz opened 6 years ago

bryanvaz commented 6 years ago

the getUserByUsername endpoint still seems to require authentication for public profiles.

The following code should work but instead I get StatusCodeError: 403 - undefined:

const Instagram = require('instagram-web-api');

const client = new Instagram({ username: 'instagram', password: '' });

(async () => {
  // await client.login();
  // const profile = await client.getProfile();
  try {
    const p39 = await client.getUserByUsername({ username: 'instagram' });
    console.log(p39);
  } catch(e){
    console.error(e);
  }

})();

Has anyone actually got this to work without authenticating?

MonsieurBibo commented 3 years ago

I might be wrong, but I don't see any indication that authentication is not necessary.