I'm experiencing a sudden 403 error when calling OpenAI API from Google Cloud Run functions deployed in the asia-northeast3 region. This issue started appearing a few days ago, while the same setup was working perfectly before.
Error code: 403 - {'error': {'code': 'unsupported_country_region_territory', 'message': 'Country, region, or territory not supported', 'param': None, 'type': 'request_forbidden'}}
After debugging, I discovered that the IP address 34.96.43.150 (used by GCP zone asia-northeast3-1) is being identified as a Hong Kong IP by geolocation services. Since OpenAI API blocks requests from Hong Kong, this causes the 403 error despite South Korea being officially supported by OpenAI.
Planning to migrate to a different region (possibly asia-northeast1 or asia-southeast1) to resolve this issue.
Has anyone encountered similar issues with other regions or third-party APIs? Any insights would be greatly appreciated.
Solved! Go to Solution.
Hi @Ashuro,
Welcome to Google Cloud Community!
Has anyone else experienced similar geolocation issues with the asia-northeast3
region?
Yes, while not directly tied to the asia-northeast3
region, there are related discussions confirming the persistence of the ‘unsupported_country_region_territory
’ error. On platforms like Server Fault and Stack Overflow, users have reported that Google Cloud IPs are often misgeolocated. Although some of these reports are outdated, they may still provide helpful insights.
Is this a known issue with IP address allocation in this region?
This is a known issue caused by differences in how IP geolocation data is sourced and maintained. Google Cloud Platform’s (GCP) IP geolocation uses their own methods, while third-party services like OpenAI rely on external databases that may misclassify some IPs. So, IPs in asia-northeast3
might sometimes appear as from other regions (like Hong Kong) to those services, leading to access issues.
Are there any recommended workarounds besides switching regions?
Should I report this as a potential infrastructure issue to Google Cloud Support?
Based on the Google cloud documentation, it states that:
“Google proprietary IP geolocation technology uses a combination of networking data and other inputs and methods to provide IP address location and network resolution for our users. Other organizations may use different signals or methods, which might occasionally lead to different results. If cases arise in which you experience an inconsistency in IP geolocation results that Google provides, please open a customer support case, so that we can investigate and, if appropriate, correct our records moving forward.”
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
Hi @Ashuro,
Welcome to Google Cloud Community!
Has anyone else experienced similar geolocation issues with the asia-northeast3
region?
Yes, while not directly tied to the asia-northeast3
region, there are related discussions confirming the persistence of the ‘unsupported_country_region_territory
’ error. On platforms like Server Fault and Stack Overflow, users have reported that Google Cloud IPs are often misgeolocated. Although some of these reports are outdated, they may still provide helpful insights.
Is this a known issue with IP address allocation in this region?
This is a known issue caused by differences in how IP geolocation data is sourced and maintained. Google Cloud Platform’s (GCP) IP geolocation uses their own methods, while third-party services like OpenAI rely on external databases that may misclassify some IPs. So, IPs in asia-northeast3
might sometimes appear as from other regions (like Hong Kong) to those services, leading to access issues.
Are there any recommended workarounds besides switching regions?
Should I report this as a potential infrastructure issue to Google Cloud Support?
Based on the Google cloud documentation, it states that:
“Google proprietary IP geolocation technology uses a combination of networking data and other inputs and methods to provide IP address location and network resolution for our users. Other organizations may use different signals or methods, which might occasionally lead to different results. If cases arise in which you experience an inconsistency in IP geolocation results that Google provides, please open a customer support case, so that we can investigate and, if appropriate, correct our records moving forward.”
Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.
I'm from South Korea and having the same issue.
I'm using gcp with asia-northeast3-a and my ip external address is 34.64.58.201.
When I checked the IP's geolocation, it says Seoul, but strangely I keep getting the same 403 error:
Unexpected error: Error code: 403 - {'error': {'code': 'unsupported_country_region_territory', 'message': 'Country, region, or territory not supported', 'param': None, 'type': 'request_forbidden'}}
Did you resolve this issue? Please let me know if migrating to a different zone works.
Unfortunately, I have not received paid support yet, so the issue hasn’t been resolved. It continues to recur intermittently. Currently, we are handling it by reconnecting to GCP and retrying after a certain interval whenever the error occurs.
The OpenAI support team says that the issue is fixed. My app is finally working fine now.
https://community.openai.com/t/cloud-run-in-asia-northeast3-suddenly-getting-unsupported-country-reg...
That's great. Thank you for sharing the information.