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] IP address blocked #2037

Open
7FULL opened this issue Sep 29, 2024 · 2 comments
Open

[BUG] IP address blocked #2037

7FULL opened this issue Sep 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@7FULL
Copy link

7FULL commented Sep 29, 2024

Describe the bug
I run a very simple code and instagram blocks me

To Reproduce
First of all I am in europe, and I didnt get it to work until I activated a VPN

This is my code

from instagrapi import Client as InstagraClient

instaApi = InstagraClient()
time.sleep(10)
instaApi.login(USERNAME, PASSWORD)

Traceback

Traceback (most recent call last):
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\instagrapi\mixins\private.py", line 359, in _send_private_request
    response.raise_for_status()
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\requests\models.py", line 1024, 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 "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\app.py", line 517, in <module>
    instaApi.login(USERNAME, PASSWORD)
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\instagrapi\mixins\auth.py", line 441, in login
    logged = self.private_request("accounts/login/", data, login=True)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\instagrapi\mixins\private.py", line 541, in private_request
    raise e
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\instagrapi\mixins\private.py", line 526, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "I:\$$$\GeneradorImagenes\ImageGeneratorBot\bot\.venv\Lib\site-packages\instagrapi\mixins\private.py", line 415, in _send_private_request
    raise BadPassword(**last_json)
instagrapi.exceptions.BadPassword: We can send you an email to help you get back into your account. If you are sure that the password is correct, then change your IP address, because it is added to the blacklist of the Instagram Server

Expected behavior
For it to log me in

Screenshots
No need for screenshots

Desktop:

  • OS: [e.g. Windoes 11]
  • Python version [3.12]
  • instagrapi version [2.1.2]
@7FULL 7FULL added the bug Something isn't working label Sep 29, 2024
@sunmasters
Copy link

Use mobile IP. Or proxy

@7FULL
Copy link
Author

7FULL commented Oct 25, 2024

Use mobile IP. Or proxy

How can I do that?

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

2 participants