ThinkFacility

Error messages

Country, region, or territory not supported

The message

Country, region, or territory not supported
OpenAI API 3.19.2 read September 25, 2026OpenAI API403hosting

What it means

OpenAI placed the IP address your request came from in a country or territory it doesn't serve, and refused it.

What to do

Find where the machine that actually calls the API sits (cloud region, edge location, VPN exit) and move it to a supported country. If it's already in one, send OpenAI support the IP.

The OpenAI API sends this 403 when it decides your request came from somewhere it doesn't serve. The body, as a developer posted it on OpenAI's forum:

{
  "error": {
    "code": "unsupported_country_region_territory",
    "message": "Country, region, or territory not supported",
    "param": null,
    "type": "request_forbidden"
  }
}

In Python it arrives as PermissionDeniedError, and the Node library prints Error: 403 Country, region, or territory not supported. GitHub has 214 issues carrying the code as of September 25, 2026, 91 of them opened since June.

Which location counts

OpenAI's error-code page gives one cause: "You are accessing the API from an unsupported country, region, or territory." What matters is the IP of the machine making the call. Your own location and your billing address don't come into it. That's why the error so often shows up in production after everything worked on a laptop.

The supported list has 208 entries as of September 25, 2026. Hong Kong and mainland China aren't on it. The page also warns that using or offering access from outside the list "may result in your account being blocked or suspended", so a VPN is a risky fix.

Hosts that sit somewhere you didn't pick

Most threads we read were from people in supported countries whose code ran somewhere else. A developer in Taiwan on Vercel found their edge functions were being served from Hong Kong, and fixed it by disallowing Hong Kong as a location. In August 2026 an OpenCode user got it for GPT-5.6 from a Hong Kong server while other models worked from the same host. A forum moderator's first questions in one thread were whether the host had other datacenters and whether Cloudflare sat in front.

So check the exit point: the cloud region of the function or container, any edge or proxy layer, and the VPN if there is one. Pinning the region to a supported country is usually the whole fix.

When OpenAI gets the location wrong

Sometimes the IP really is in a supported country. In June 2025 a batch of Google Cloud Run services in Seoul suddenly started getting this error. OpenAI Support replied that "South Korea is a supported country" and asked for the IP address "so we can check whether it's being incorrectly geolocated to a blocked region". Three days later support said "This issue should be fixed now." The original poster hadn't waited and had moved to another region, which also worked.

We were surprised a mislocated IP got fixed that quickly. If you're sure the server is in a supported country, post the IP to support rather than rebuilding your hosting.

Retrying won't change it

openai-python 3.19.2 doesn't retry a 403, and the same IP will get the same answer. OpenAI's docs also use 403 for plain lack of access ("You don't have access to the requested resource"), so read error.code. Only unsupported_country_region_territory is about location.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • unsupported_country_region_territory
  • Error code: 403 - {'error': {'code': 'unsupported_country_region_territory', 'message': 'Country, region, or territory not supported', 'param': None, 'type': 'request_forbidden'}}
  • Error: 403 Country, region, or territory not supported
  • openai.PermissionDeniedError: Error code: 403