OpenAI API error
OpenAI API 403 Country, region, or territory not supported: what it means and how to fix it
403 Country, region, or territory not supportedRetry? Not statedLast verified 1 documented fix3 sources
What it means
You are accessing the API from an unsupported country, region, or territory. The Python library maps 403 responses to PermissionDeniedError.
Causes
- Accessing the API from an unsupported country, region, or territory
How to fix it
- Fix 1.
See the supported countries page for the list of supported locations.
More OpenAI API errors
All 23 OpenAI API errors400 invalid_request_error (Invalid service_tier argument)Retry? Not stated401 Invalid AuthenticationRetry? Not stated401 Incorrect API key providedRetry? Not stated401 You must be a member of an organization to use the APIRetry? Not stated401 IP not authorizedRetry? Not stated429 credit_balance_exhaustedRetry? No429 Rate limit reached for requestsRetry? Yes429 rate_limit_error slow_downRetry? Yes
HTTP 403 at other providers
Compare 403 across providers403 AccessDeniedExceptionRetry? NoAmazon Bedrock403 InvalidClientTokenIdRetry? Not statedAmazon Bedrock403 MPAgreementBeingCreatedRetry? YesAmazon Bedrock403 AWS Marketplace Agreement Failed within 15 minutesRetry? Not statedAmazon Bedrock403 AWS Marketplace Agreement Pending after 15 minutesRetry? YesAmazon Bedrock403 permission_errorRetry? Not statedAnthropic API403 Forbidden (network access denied)Retry? Not statedAzure OpenAI403 Forbidden (resource has been temporarily blocked)Retry? Not statedAzure OpenAI403 permission_deniedRetry? NoGemini API403 PERMISSION_DENIEDRetry? NoGemini API403 ForbiddenRetry? Not statedGroq API403 ForbiddenRetry? Not statedMistral API
FAQ
What does the OpenAI API error "403 Country, region, or territory not supported" mean?
You are accessing the API from an unsupported country, region, or territory. The Python library maps 403 responses to PermissionDeniedError.
How do I fix OpenAI API "403 Country, region, or territory not supported"?
See the supported countries page for the list of supported locations.
Should I retry OpenAI API "403 Country, region, or territory not supported"?
Not stated. The official docs do not say whether this error is retryable.
Which other AI APIs return HTTP 403?
Per their official error docs: Amazon Bedrock (403 AccessDeniedException; 403 InvalidClientTokenId; 403 MPAgreementBeingCreated; 403 AWS Marketplace Agreement Failed within 15 minutes; 403 AWS Marketplace Agreement Pending after 15 minutes), Anthropic API (403 permission_error), Azure OpenAI (403 Forbidden (network access denied); 403 Forbidden (resource has been temporarily blocked)), Gemini API (403 permission_denied; 403 PERMISSION_DENIED), Groq API (403 Forbidden), Mistral API (403 Forbidden), OpenRouter (403 permission_denied; 403 Budget limit exceeded; 403 content_policy_violation; 403 refusal), Vertex AI (403 PERMISSION_DENIED), xAI API (403 Forbidden).
Sources
Last verified against 3 sources: OpenAI API's official docs and official SDK repositories.
- developers.openai.comhttps://developers.openai.com/api/docs/guides/error-codes
- developers.openai.comhttps://developers.openai.com/api/docs/supported-countries
- github.comhttps://github.com/openai/openai-python/blob/main/README.md
Newsletter
Know when the APIs change
One email per week. New model releases, API changes, what broke, and how developers are working around it.