"code": 400, "message": "User location is not supported for the API use.", "status": "FAILED_PRECONDITION"

I am in Atlanta, and my servers are in ATL, washington an VA

My service was working yesterday and for the last 2 weeks.
I just got this issue today with no changes.

I have tested differnt keys
I have tested differnt cities in US

i decided to test the billing option and i still get the same error.

I added 10 dollars to my billing an i am having the same issue.

i looked at my reports i do not see external users from other ip’s.

Some one please assist me in fixing this

1 Like

I just tryed a vm in a differnt state an it worked, this is crazy and it is preventing me from loadbalacing

I am facing the same issue. Totally crickets from Google. My research has shown that it seems to be a network issue, in that one IP in Los Angeles doesn’t work, yet another one in Los Angeles does. I ended up using a proxy server to reflect my traffic from a “fail” network to a “succeed” network. It has been working for 24 hours now via proxy. Fingers crossed that this proxy IP range doesn’t get blocked before Google wakes up and fixes this issue.

Hello,

I have had a similar issue: On my local version, everything worked fine (Austria), but after deploying via Docker on Ubuntu I got the code 400 Failed Prerequisit. I tried changing proxys, API-Keys, funded accounts - nothing worked. The solution for me was to not use docker and install and run the program on my vps without docker. Hope this helps

1 Like

Out of desperation, I implemented reflecting my API calls through a proxy server in Los Angeles (from Dallas) and everything worked. After running in this configuration for a week or so, I checked the direct connection again and found that it worked. After a few hours of production use, the failure returned, forcing me to resort to the proxy again. Things are fine through the Los Angeles proxy. There are clearing routing issues inside the Gemini infrastructure.