【问题标题】:Geolocation API: Requested entity was not found地理位置 API:未找到请求的实体
【发布时间】:2021-01-18 04:44:36
【问题描述】:

我是第一次尝试 Geolocation API,但无法使其正常工作。 尝试来自 https://developers.google.com/maps/documentation/geolocation/overview 的示例,但总是返回 404。我已经为此项目启用了计费功能。

请求正文:

{
  "homeMobileCountryCode": 412
}

回复:

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

【问题讨论】:

  • 同样的问题,与 Postman 合作。不管我提供什么信息。你找到解决办法了吗?
  • 还是同样的问题。我放弃了:)
  • 有人有解决办法吗?

标签: google-geolocation


【解决方案1】:

我也面临同样的问题。然后我查找了未关联的结算帐户。链接后,我尝试通过邮递员再次请求它,它确实给了我经纬度和准确性的回复

请求 1

{
  "considerIp": "true",
  "wifiAccessPoints": [
   {
     "macAddress": "00:1e:32:f2:32:ff"
  }

  ]
}

请求 2

{
     "homeMobileCountryCode": 412
}

对这两个请求的响应

{
"location": {
    "lat": 31.473738999999995,
    "lng": 74.253135
},
"accuracy": 1528
}

【讨论】:

  • 感谢您的回答。我可以确认禁用计费也给了我 404 错误。我从没想过要查看计费 - 他们真的应该返回不同的错误代码。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-02-19
  • 2013-12-20
  • 2017-04-21
  • 2020-12-14
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多