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

It is quite frustrating, isn’t it?

I would suggest:

  1. Report the IP geolocation issue here: Report IP problems - Google Search Help
  2. Consider connecting with IPv6 instead, as a workaround. See Generate object error User location is not supported for the API use - #62 by crishoj