subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.21k stars 667 forks source link

[BUG] Instagram has blocked your IP address, use a quality proxy provider (not free, not shared) #1698

Open Lightkira3843 opened 9 months ago

Lightkira3843 commented 9 months ago

Try Instagrapi SaaS with a free trial https://hikerapi.com/p/5GBWznd3

Describe the bug when i try to login to instgram by instagrapi by the following code

from instagrapi import Client

user_id="insta mail"
password='insta passwd'

cl = Client()
cl.login(user_id, password)
cl.dump_settings("session.json")

the error i m getting

Traceback Traceback (most recent call last): File "/home/kali/.local/lib/python3.11/site-packages/instagrapi/mixins/private.py", line 360, in _send_private_request response.raise_for_status() File "/usr/lib/python3/dist-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 "/home/kali/temp_instatest.py", line 7, in cl.login(user_id, password) File "/home/kali/.local/lib/python3.11/site-packages/instagrapi/mixins/auth.py", line 441, in login logged = self.private_request("accounts/login/", data, login=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/kali/.local/lib/python3.11/site-packages/instagrapi/mixins/private.py", line 542, in private_request raise e File "/home/kali/.local/lib/python3.11/site-packages/instagrapi/mixins/private.py", line 527, in private_request self._send_private_request(endpoint, kwargs) File "/home/kali/.local/lib/python3.11/site-packages/instagrapi/mixins/private.py", line 447, in _send_private_request raise ProxyAddressIsBlocked(last_json) instagrapi.exceptions.ProxyAddressIsBlocked: Instagram has blocked your IP address, use a quality proxy provider (not free, not shared)

Expected behavior it must dump the insta login session in session.json file

Screenshots Screenshot_2023-12-14_21-22-47 Screenshot_2023-12-14_21-23-34

Desktop (please complete the following information):

Additional context i have also tried the same thing on windows & on cloud server as well but keep getting the same error

nebula0225 commented 9 months ago

use a quality proxy provider (not free, not shared)

Diptonil commented 6 months ago

Is this issue still not resolved?