What does HTTP status code 511 mean?
The 511 Network Authentication Required status code indicates that the client must authenticate to gain network access (e.g., captive portals).
When to use it in APIs
Typically generated by public Wi-Fi networks or proxies before letting request traffic through to the internet.
How it compares to other codes
- 401 Unauthorized: Identifies authentication needed for the target API host, whereas 511 is for access to the network itself.