The target site.

401 — Unauthorized

The target wants credentials it did not get. Note the difference from 407: a 401 comes from the destination and concerns your account there; a 407 comes from the proxy and concerns your proxy credentials.

A proxy fixes part of this. Rotation causes as many 401s as it solves. Where a login is involved, holding one IP for the life of the session is what fixes it — a sticky session rather than more addresses.

Why it happens

No Authorization header, or an expired token.

A session cookie tied to the IP that issued it — rotating the exit address invalidated the session.

The API key is valid but not for this endpoint or this region.

How to fix it

  1. Separate the two failures: if curl through the same proxy returns 401 and without the proxy returns 200, the session is IP-bound.
  2. Pin the exit address for the whole session with a sticky token when the target ties the session to an IP.
  3. Refresh the token before it expires rather than after the first 401.

FAQ

What does 401 mean?›
The target wants credentials it did not get. Note the difference from 407: a 401 comes from the destination and concerns your account there; a 407 comes from the proxy and concerns your proxy credentials. The target site.
Why am I getting 401?›
No Authorization header, or an expired token. A session cookie tied to the IP that issued it — rotating the exit address invalidated the session. The API key is valid but not for this endpoint or this region.
How do I fix 401?›
Separate the two failures: if curl through the same proxy returns 401 and without the proxy returns 200, the session is IP-bound. Pin the exit address for the whole session with a sticky token when the target ties the session to an IP. Refresh the token before it expires rather than after the first 401.
Will a proxy fix 401?›
Rotation causes as many 401s as it solves. Where a login is involved, holding one IP for the life of the session is what fixes it — a sticky session rather than more addresses.

Other errors

Stop getting 401

Residential IPs across 199 countries, from $7.35/GB — no commitment, no monthly plan.

Get residential IPs →