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

login not working[BUG] #1930

Open
MarcoLavoro opened this issue May 20, 2024 · 3 comments
Open

login not working[BUG] #1930

MarcoLavoro opened this issue May 20, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@MarcoLavoro
Copy link

If I try to execute this:
`>>> from instagrapi import Client

cl = Client()
cl.login(USERNAME, PASSWORD)`

I get this error:

`python prova.py
Status 429: Too many requests
Ignore 429: Continue login
Traceback (most recent call last):
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 302, in _send_private_request
response.raise_for_status()
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 1021, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\OFFLINEPROJECTS\BOTS\UploadInstagram3\prova.py", line 26, in
cl.login(ACCOUNT_USERNAME, ACCOUNT_PASSWORD)
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\auth.py", line 390, in login
logged = self.private_request("accounts/login/", data, login=True)
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 451, in private_request
raise e
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 438, in private_request
self._send_private_request(endpoint, **kwargs)
File "C:\Users\carlo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 358, in _send_private_request
raise UnknownError(**last_json)
instagrapi.exceptions.UnknownError: You'll need to update Instagram to the latest version before you can use the app.
`

Is this a bug?

@MarcoLavoro MarcoLavoro added the bug Something isn't working label May 20, 2024
@ProgrameurGentil
Copy link

Hi, I'm having the same problem. What do I need to do to solve it?

@kingbotss
Copy link

Bad IP or Proxy. Change it

@aboubakrjeb
Copy link

according to the documentation, you can add a delay to mimic the behaviour of a real user:
# adds a random delay between 1 and 3 seconds after each request cl.delay_range = [1, 3]

and you can check if the username exists by sending a get request to www.instagram.com/{username} because the login function always return true if the credentials are false!!

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

4 participants