Google GeolocationAPI Requested entity was not found

Viewed 5189

So Im trying to use the Google GeolocationAPI. It sends the quest successfully and also authenticates successfully with my api key but it returns me this

    {
        "error": {
            "code": 404,
            "message": "Requested entity was not found.",
            "errors": [
                {
                    "message": "Requested entity was not found.",
                    "domain": "global",
                    "reason": "notFound"
                }
            ],
            "status": "NOT_FOUND"
        }
    }

The url Im requesting to is https://www.googleapis.com/geolocation/v1/geolocate?key=MY_KEY with post as described in the documentation.

Thanks in advance

4 Answers

I recommend you to check out the documentation:

As you can read:

Before you start developing with the Geolocation API, review the authentication requirements (you need an API key) and the API usage and billing information (you need to enable billing on your project).

I was getting the exact same error until my billing information was validated. How I realized it, was using the geocoding API, which does return a better error.

You need to create and associate a billing account to your project. It will work immediately.

We started getting a 404 error just because our credit card expired and Google could not bill us. When we updated the billing information the API came to life again.

usually, this error occurs when user access is revoked.

Related