Proxy blocked

Instagram's username error was rewritten as a blocked IP.

The error#

When the message contains The username you entered, instagrapi replaces message and raises ProxyAddressIsBlocked:

Instagram has blocked your IP address, use a quality proxy provider (not free, not shared)

That sentence is both the class docstring and the assigned message. The original Instagram text (the one that starts with The username you entered) is discarded before the raise.

The class is a subclass of PrivateError.

A related hint, used when error_type is bad_password, is appended to the password error:

This can also happen when Instagram rejects the proxy/IP, device fingerprint, or login context, even if the password is correct.

That path raises BadPassword, not ProxyAddressIsBlocked.

What triggers it#

A 400 whose message contains The username you entered. The library treats that copy as an IP block rather than a typo in the username. The comment in the source shows the usual Instagram sentences about the username not belonging to an account.

How to confirm#

The exception class is ProxyAddressIsBlocked and the text is the proxy sentence above. You will not see Instagram's original username sentence on the exception. A true unknown username and a blocked IP share this class in 3.2.2.

Fixes#

The message says to use a proxy that is not free and not shared. Change the proxy on the client and keep the same device settings if you are in the middle of a challenge (the challenge page says to retry with the same device identifiers and proxy or IP once a checkpoint is already open). A brand new IP is what this message is asking for before login. BadPassword plus the fingerprint hint is the other signal that the password may be fine and the IP is not.

SocialScrape#

Instagram profile is GET /v1/instagram/profile. A private account comes back with is_private true. Posts are GET /v1/instagram/profile/posts, and one post is GET /v1/instagram/post.

Failed requests cost 0 credits. New accounts get 100 credits on signup, no card. Codes are on errors.

Questions

Could this be a typo in the username?

The library does not keep that possibility. Any message containing The username you entered becomes ProxyAddressIsBlocked.

Does SocialScrape take a proxy from me?

No. A blocked fetch is upstream_blocked and costs 0 credits.