Timeouts could mean the server’s just slow or your connection’s shaky. Add `-TimeoutSec 30` to give it more breathing room.
For 403s, yeah, def add a user-agent. Some sites straight-up block PowerShell’s default UA. Here’s a quick fix:
```powershell
$ProgressPreference = 'SilentlyContinue' # Stops progress from slowing things down
Invoke-WebRequest -Uri "https://example.com/api/data" -UserAgent "Mozilla/5.0"
```
If it’s still failing, maybe the API requires a referrer header. Check the dev tools in your browser (F12) while hitting the endpoint.
For 403s, yeah, def add a user-agent. Some sites straight-up block PowerShell’s default UA. Here’s a quick fix:
```powershell
$ProgressPreference = 'SilentlyContinue' # Stops progress from slowing things down
Invoke-WebRequest -Uri "https://example.com/api/data" -UserAgent "Mozilla/5.0"
```
If it’s still failing, maybe the API requires a referrer header. Check the dev tools in your browser (F12) while hitting the endpoint.
