instagrapi: [BUG] The username you entered doesn't appear to belong to an account

Hi,

When trying to login with cl.login(username, password)

I’m getting this error message The username you entered doesn't appear to belong to an account. Please check your username and try again.

The username and password are correct and I’m able to login via Instagram App or desktop. This is weird as it works fine when I run this from my local machine from python shell. But it throws me the above error if I run it from AWS instance.

Any ideas?

Also I noticed that the following error is thrown:

HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

I also tried using proxy - but it does not help

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 20 (7 by maintainers)

Most upvoted comments

@F481 All this can be changed through the settings: load_settings, set_settings, get_settings

This is described with examples in the documentation

@adw0rd This issue is not resolved. You should reopen it, so the community can see that this bug is still existing and can work on it. I have the same problem and like some other users changing the proxy does not help.

I had the situation that it was always working on my local machine (MacBook Pro) while developing. It did not work after uploading to AWS Lambda, Azure Functions or Google Cloud Functions, but in parallel it was still working on my local machine. I did some testing and deployed it to a Raspberry Pi in my home network (same outgoing IP as my machine). Running the script on the RPi resolved in the above error. After that it’s not working any longer on my local machine too. Also not after getting a new IP address.

This doesn’t seem to happen much when it’s local, but soon as I deploy to Azure it throws this error.