I am encountering an issue while trying to access the Google Gemini API and would appreciate your assistance. Below are the details of the problem: Project Information: My Google Cloud Project ID is [gen-lang-client-0562653388]. API Key: I am using an API key (for security reasons, I will not provide the full key here). Issue Description: When I attempt to call the Gemini API (model: gemini-2.0-flash) from my server, I receive the following error message:
{ “error”: { “code”: 400, “message”: “User location is not supported for the API use.”, “status”: “FAILED_PRECONDITION” } }
My server IP address according to multiple IP lookup tools (e.g., ipinfo.io), is located in San Jose, California, US—a region that should theoretically support the Gemini API.
Used various IP lookup tools to confirm my server location, all indicating it is in the US. Checked my project settings and API enablement status in the Google Cloud Console. Tested different Gemini models, but the issue persists. Since my server location appears to be in the US, I suspect that my IP address might be misidentified as being in an unsupported region, or there may be a restriction on my account/project. I would like to ask the following: Can you confirm whether my server IP address is correctly recognized as being in a supported region? Is there a regional restriction on my Google Cloud account or project that prevents access to the Gemini API? Are there any other solutions or permission request processes that could resolve this issue?