Hello,
I’m experiencing a persistent location-related error when calling the Gemini API from a Java application running on Wispbyte hosting.
Every request to generate content fails with the following error:
HTTP 400
FAILED_PRECONDITION
User location is not supported for the API use.
Environment
-
Hosting provider: Wispbyte
-
Runtime: Java 21 (Temurin 21.0.12.1)
-
Application: Java / Spring Boot
-
Public outbound IPv4:
78.154.103.40 -
IP geolocation: Bacău, Romania
-
Network provider identified by IP lookup services: FIVE CYBER HOST SECURITY S.R.L. (AS210718)
According to the official Gemini API supported-regions documentation, Romania is a supported country:
Tests performed
I ran independent network diagnostics directly inside the hosting container, without modifying my application code.
-
IPv4 connectivity works. An external IP lookup service returns
78.154.103.40. -
Three IP geolocation services (ipinfo.io, ipwho.is, and ip-api.com) identify the IP as being in Romania.
-
DNS resolution for
generativelanguage.googleapis.comsucceeds. -
An HTTPS request to the Gemini API endpoint reaches Google’s servers. An unauthenticated request to
/v1beta/modelsreturns HTTP 403, as expected when no API credentials are provided. -
IPv6 connectivity is unavailable in the container (
Network is unreachable). -
I tried starting the application with
-Djava.net.preferIPv4Stack=true, but the original location error remained unchanged.
The application uses its configured API credentials for actual Gemini requests. No API keys or private credentials are included in this report.
Questions
Could this be caused by Google’s internal geolocation or IP reputation data incorrectly classifying the hosting IP, even though external geolocation services identify it as a supported country?
Could the same error also indicate an API project or account eligibility issue?
Is there a way to check how Google classifies this IP for Gemini API access and request a review or correction if necessary?
I would appreciate any troubleshooting steps or information that could help determine the cause. I can provide additional sanitized logs and request timestamps if needed.
Thank you!