# aiohttp.client_exceptions.ClientHttpProxyError: 407 Proxy Authentication Required

- **ID:** `python/aiohttp-client-connector-http-error`
- **Domain:** python
- **Category:** auth_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

The proxy server requires authentication, but none was provided or the credentials are invalid.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.10 | active | — | — |
| 3.11 | active | — | — |

## Workarounds

1. **Use aiohttp.BasicAuth for proxy authentication** (90% success)
   ```
   proxy_auth = aiohttp.BasicAuth('username', 'password')
async with session.get(url, proxy='http://proxy.example.com:8080', proxy_auth=proxy_auth) as resp:
   ```
2. **Set proxy credentials in the URL** (85% success)
   ```
   async with session.get(url, proxy='http://user:pass@proxy.example.com:8080') as resp:
   ```

## Dead Ends

- **Providing empty username and password** — Most proxies reject empty credentials, causing the same error. (60% fail)
- **Using HTTP Basic Auth headers manually without proper encoding** — Incorrect encoding or missing headers may still result in 407. (50% fail)
