# HTTP 403 `unsupported_country_region_territory` — API Store Hub

> VI: HTTP 403 `unsupported_country_region_territory` xảy ra khi gọi trực tiếp hãng AI từ IP thuộc khu vực bị giới hạn, dùng VPN công cộng bị gắn cờ hoặc API key bị chặn theo quyền truy cập.
> EN: HTTP 403 geo-restriction errors happen when vendor APIs block your server IP region, flagged datacenter VPNs, or restricted key scopes.

- Canonical VI: https://apistorehub.com/vi/loi-api/403-region-country-not-supported
- Canonical EN: https://apistorehub.com/en/loi-api/403-region-country-not-supported
- Retry Policy: Do not blindly retry HTTP 403; fix the base URL or key permissions first.

## Root Causes
- Calling vendor endpoints directly from geo-restricted server IPs or flagged VPN ranges.
- API key model allowlist or IP restriction blocking the requested model.
- Intermediate proxy stripping or rewriting authentication headers.

## Step-by-Step Resolution
1. Switch `base_url` to `https://apistorehub.com/v1` (OpenAI SDK) or `https://apistorehub.com` (Anthropic SDK) with no VPN required.
2. Verify your key is active and allowed to access the target model inside Dashboard -> Keys.
3. Clear stale `HTTP_PROXY` or `HTTPS_PROXY` environment variables pointing to blocked proxies.
4. Verify HTTP 200 directly against `https://apistorehub.com/v1/models` using cURL.

## Diagnostic cURL
```bash
curl -i https://apistorehub.com/v1/models \
  -H "Authorization: Bearer sk-ash-your_key"
```

## Production Fix (Python)
```
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://apistorehub.com/v1",
    api_key=os.environ["API_KEY"],
)
models = client.models.list()
print("Reachable models:", len(models.data))
```

## FAQ
- **Do servers in Vietnam need a VPN to reach API Store Hub?**: No. Direct calls from Vietnam ISPs and cloud regions connect cleanly without VPNs.
- **How do I fix 403 in Claude Code CLI?**: Export `ANTHROPIC_BASE_URL=https://apistorehub.com` and `ANTHROPIC_AUTH_TOKEN=sk-ash-...` then restart the CLI.
- **Why might 403 still happen after switching to {base}?**: Check key-level model restrictions or IP allowlists in Dashboard -> Keys.
