最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Google GeolocationAPI Requested entity was not found - Stack Overflow

programmeradmin4浏览0评论

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 with post as described in the documentation.

Thanks in advance

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./geolocation/v1/geolocate?key=MY_KEY with post as described in the documentation.

Thanks in advance

Share Improve this question asked Aug 25, 2020 at 19:13 F4LS3F4LS3 1513 silver badges13 bronze badges 11
  • What is the question? Did you read the docs to see what the errors are? – charlietfl Commented Aug 25, 2020 at 19:41
  • There is no specification about this error actually as far as I've seen it there is no specification for any error – F4LS3 Commented Aug 25, 2020 at 20:15
  • Should tell you what the responses – charlietfl Commented Aug 25, 2020 at 20:20
  • I think I dont understand? – F4LS3 Commented Aug 25, 2020 at 20:21
  • If you send an adrress or lat/long you get a response. If it can process that response it sends back location data, if it can't it sends back an error message like you receieved. That is documented – charlietfl Commented Aug 25, 2020 at 20:30
 |  Show 6 more ments

4 Answers 4

Reset to default 4

I remend 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.

发布评论

评论列表(0)

  1. 暂无评论