Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The username you entered doesn't appear to belong to an account #818

Closed
v-bazhenov opened this issue Jul 30, 2022 · 20 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@v-bazhenov
Copy link

v-bazhenov commented Jul 30, 2022

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

@v-bazhenov v-bazhenov added the bug Something isn't working label Jul 30, 2022
@adw0rd
Copy link
Contributor

adw0rd commented Jul 31, 2022

This message return back from instagram, I don't know why. If you help the project and investigate the reasons, then I will be extremely grateful to you!

@adw0rd adw0rd assigned v-bazhenov and unassigned adw0rd Jul 31, 2022
@LoreVanOudenhove
Copy link

I have noticed the exact same bug when using AWS Lambda (with/without using a proxy)...
The weird thing is that it seems to work from time to time, but then suddenly the Error shows up.

@alex-96-eng
Copy link

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

@bilakos26
Copy link
Contributor

I was trying to work with proxies and this error was popping up when one proxy wasn't good enough.

@pama1999
Copy link

pama1999 commented Aug 7, 2022

Alright same thing is happening to me,

Working on my local pc works perfect no login issue or anything,

but as soon I run it on a windows server, I get the same login error, although I have to mention that it works sometimes and sometimes not

@petersevera
Copy link

Got this error first time yesterday, tried from many proxies - always the same error... It was working fine from those IP for months... Please, help

@petersevera
Copy link

changing proxy ip helps

@LoreVanOudenhove
Copy link

Which type of proxies do you use?

changing proxy ip helps

Which type of proxies do you use?

@pama1999
Copy link

pama1999 commented Aug 9, 2022

tried on a linux server machine and it works!

switched to another windows server with another ip and I get this error "sometimes"

@Siegi96
Copy link

Siegi96 commented Aug 10, 2022

I also get this message quite frequently, even when using residential IPs. Same accounts with same IPs work fine when I do a login with another of my services, where I use a selenium script to login. I can also use them for scraping with the selenium login generated session. When I try again to login using instagrapi, I get
{'message': "The username you entered doesn't appear to belong to an account. Please check your username and try again.", 'status': 'fail', 'error_type': 'ip_block', 'exception_name': 'RleLoginBlocked'}
again.

So this definetly has something to do with the login logic/endpoints of the library @adw0rd .

@adw0rd
Copy link
Contributor

adw0rd commented Aug 10, 2022

@Siegi96 #836 (comment)

@adw0rd adw0rd closed this as completed Aug 10, 2022
@F481
Copy link

F481 commented Jan 4, 2023

@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.

@adw0rd
Copy link
Contributor

adw0rd commented Jan 5, 2023

@F481 Changing proxies always helps me, but if you find a new way to get out of this block, then send a PR

@adw0rd adw0rd reopened this Jan 5, 2023
@F481
Copy link

F481 commented Jan 11, 2023

Just a hint for the people who also notice this error and using / changing proxy does not help.

I got it work for me now by changing "country", "country_code", "Phone code", "locale" and "timezone_offset" in the file mixins/auth.py to my "real" values. In addition you can try to play around with the "USER_AGENT_BASE" in config.py.

@F481 F481 removed their assignment Jan 11, 2023
@adw0rd
Copy link
Contributor

adw0rd commented Jan 11, 2023

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

This is described with examples in the documentation

@adw0rd adw0rd closed this as completed Jan 11, 2023
@imJunaidAfzal
Copy link

Anyone found any permanent solution for this issue?

@pedrocastellanos
Copy link

I have the same problem. Any solution?

@adw0rd
Copy link
Contributor

adw0rd commented May 20, 2023

I have the same problem. Any solution?

use another proxy

@pedrocastellanos
Copy link

@adw0rd I'm not using proxy

@adw0rd
Copy link
Contributor

adw0rd commented May 20, 2023

@adw0rd I'm not using proxy

That is the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests