Guides ·

unsupported_country_region_territory: why ChatGPT and the OpenAI API say your region isn’t supported

The short version: unsupported_country_region_territory (Country, region, or territory not supported) means OpenAI decided the request came from a country or region it doesn’t serve, and the IP that matters is the one OpenAI’s servers see, not the one an IP checker shows. As of 2026-10-01, mainland China, Hong Kong and Macau are not on OpenAI’s supported lists for ChatGPT or the API. Taiwan is.

At a glance: which exit OpenAI seesRequests from the browser, the terminal and a server can each leave from a different exit. In the browser, per-domain rules or IPv6 can give chatgpt.com another exit; the terminal doesn’t inherit the browser’s proxy; for code on a server, OpenAI sees the server’s exit. At a glance: which exit OpenAI sees Browser: ChatGPT on the web May be split Browser Domain rules Browser exit The checker and chatgpt.com may take different lines, and IPv6 can skip an IPv4-only proxy. Terminal: Codex, API scripts Own settings Terminal Its own proxy Terminal exit It doesn’t inherit the browser’s proxy. Sign-in uses the browser; requests come from the terminal. Server: code in the cloud Server exit Your app Cloud server Server exit OpenAI sees the server’s exit, not your laptop’s. Check /cdn-cgi/trace on the path that throws the error.
An IP checker only sees the path that opened it. When the error appears, check the exit of whatever sent the request: the browser, the terminal or the server.

Sources: OpenAI’s ChatGPT supported countries, API supported countries and API error codes pages, plus Help Center articles on the “unsupported country” sign-up error, access problems after travel and access and payment from unsupported countries. Community reports are labeled as such.

Where the error shows up

  • OpenAI API: the error codes guide lists 403 - Country, region, or territory not supported, caused by “accessing the API from an unsupported country, region, or territory”. In the official Python library a 403 raises PermissionDeniedError (see the openai-python README).
  • Codex: Codex signs in with either a ChatGPT account or an API key. Users have reported getting this exact error from Codex in OpenAI’s Codex GitHub repository (community report).
  • ChatGPT web and apps: the Help Center says you’ll see an “unsupported country” error when signing up or creating an API key from outside the supported list. The text users post in the community is usually OpenAI's services are not available in your country., sometimes followed by (error=unsupported_country).

The full API response, as users have posted it in community threads and GitHub issues, looks like this:

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

OpenAI’s guide documents the status code and message; the code and type fields come from those user reports.

How OpenAI decides where you are

OpenAI doesn’t publish its method. Its wording is always about where you access the service from: the ChatGPT list is described as the countries, regions and territories “we can currently support access from”, and warns that accessing or offering access from anywhere else may get an account blocked or suspended. Separately, the Help Center page on ChatGPT search says ChatGPT may use your IP address to estimate your general location.

The most direct thing any website sees is the IP that connects to it: your network exit. So check the IP that chatgpt.com and api.openai.com see, not the one some other site sees.

OpenAI also documents two other region-related cases:

  • Browser state after travel: if you used the internet in an unsupported region, you may still get region errors after returning home. OpenAI suggests clearing cache and cookies first, then trying another browser or an incognito window.
  • Payment methods: paying with a method from outside the supported list will get you blocked from the services.

Are mainland China, Hong Kong and Macau on the list?

As of 2026-10-01:

  • The ChatGPT list (web and mobile) has 208 entries. China, Hong Kong and Macau are not among them; Taiwan is.
  • The API list in the developer docs matches the ChatGPT list entry for entry, so the same three are absent.
  • The Help Center’s API list page states that OpenAI doesn’t publish a separate list of unsupported places: if a location isn’t listed, the API isn’t supported there.

See the mainland China and Hong Kong pages for how each platform treats them.

Why an IP checker says “supported” but OpenAI doesn’t

Usually OpenAI simply isn’t seeing the exit the checker sees. The common causes:

  1. Split routing by domain: proxy rules decide per domain which line to use, so the checker, chatgpt.com and api.openai.com can end up on different lines, or off the proxy entirely. OpenAI’s network recommendations list close to 30 domains ChatGPT uses, including *.chatgpt.com, *.openai.com, *.oaistatic.com and *.oaiusercontent.com. If only chatgpt.com is in your rules, sign-in and other steps can still leave from a different exit. More in Which IP do ChatGPT and Claude actually see?
  2. IPv6 taking another path: DNS lookups on 2026-10-01 returned IPv6 addresses for both chatgpt.com and api.openai.com. If your proxy only handles IPv4 and the device prefers IPv6, that traffic leaves from a different exit, while a checker may only be showing your IPv4 address.
  3. Terminal tools not using the browser’s proxy: Codex and scripts that call the API run in a terminal, which doesn’t inherit the browser’s proxy settings. Per the Codex authentication docs, signing in with ChatGPT happens in a browser window that then hands the credentials back to Codex, so sign-in uses the browser’s exit and Codex’s own requests come from the terminal. OpenAI’s network page also notes that Codex model sampling and streaming run over wss://chatgpt.com/. For the general idea of setting a terminal proxy, see Claude Code proxy settings; each tool reads its own variables, so check its documentation.
  4. Code running on a server: when an app on a cloud server calls the API, OpenAI sees the server’s exit, not your laptop’s.
  5. Geolocation disagreements: IP databases don’t always agree on where an address is. In a June 2025 OpenAI community thread, services in a Seoul cloud region suddenly got this error; OpenAI support replied that South Korea is supported, collected IPs, and a few days later said it was fixed (community thread).
One device, more than one exitWith per-domain proxy rules, the IP checker, chatgpt.com and api.openai.com can end up on different lines, or off the proxy entirely. If the proxy only handles IPv4, requests that prefer IPv6 leave from a different exit. One device, more than one exit Proxy rules split by domain IP checker Line A Supported chatgpt.com Line B Other exit api.openai.com No proxy Local exit A checker only shows the line it was sent down. IPv6 taking another path Prefers IPv6 Not proxied Other exit Happens when the proxy only handles IPv4; a checker may only be showing your IPv4 exit. If only chatgpt.com is in your rules, sign-in and other steps can still leave from a different exit.
The checker, chatgpt.com and api.openai.com can each take their own line, and IPv6 can leave separately. What counts is the IP seen by the host that returned the error.

Check the IP OpenAI actually sees

chatgpt.com, api.openai.com and auth.openai.com sit behind Cloudflare, whose diagnostic endpoint /cdn-cgi/trace shows what that server sees: ip= is your IP as seen by that host, loc= is Cloudflare’s country code for it. Cloudflare’s location may not match OpenAI’s own lookup in every case, but it tells you at a glance where the exit is.

In the browser: open https://chatgpt.com/cdn-cgi/trace and https://auth.openai.com/cdn-cgi/trace. Or use the ChatGPT IP check: your browser reads the IP chatgpt.com sees, the page checks that region against OpenAI’s ChatGPT list, shows whether the IP is residential or datacenter and whether it matches the exit that opened the page, and lists your IPv4 and IPv6 exits, flagging them if they’re in different regions.

In the terminal: in the same terminal where Codex or your script runs:

curl -s https://api.openai.com/cdn-cgi/trace | grep -E '^(ip|loc)='
curl -s https://chatgpt.com/cdn-cgi/trace | grep -E '^(ip|loc)='

Add -6 after curl to check the IPv6 path. Or run curl -sL ipjudge.org/en/cc | bash (see the terminal exit check): it uses the terminal’s current proxy environment variables to read the IPs seen by api.openai.com, chatgpt.com and others, flags exits in mainland China, Hong Kong or Macau, warns when services use different exits, and shows the no-proxy exit for comparison. It’s read-only: nothing is installed, changed or uploaded.

On a server: run the same curl commands on the machine your code runs on.

How IP Judge reaches its verdicts is explained on the method page.

FAQ

Does unsupported_country_region_territory mean my account is banned?

No, it means that request was judged to come from an unsupported region. OpenAI’s list page does warn that access from outside the list can lead to an account being blocked or suspended.

Can I use ChatGPT or the OpenAI API from Hong Kong or Macau?

As of 2026-10-01, Hong Kong, Macau and mainland China are not on the ChatGPT or API lists. Taiwan is.

ChatGPT works in my browser, but the API or Codex returns this error. Why?

The terminal or server is most likely using a different exit from the browser. Check the IP that api.openai.com and chatgpt.com see from that exact machine and terminal.

My exit is in a supported country and I still get the error. What now?

Follow OpenAI’s advice: clear cache and cookies, then try another browser or an incognito window. If that fails, contact OpenAI support and include the exit IP you had when the error appeared.

Can IP Judge guarantee OpenAI will let me in?

No. OpenAI doesn’t publish its rules. What IP Judge can do is read the IP OpenAI’s servers see and compare it with the list OpenAI publishes.

Which kind of IP do you have?

Check my IP for free