3

I am trying Geolocation API for first time, but not able to get it working. Trying a sample from https://developers.google.com/maps/documentation/geolocation/overview but always returning me 404. I already have billing enabled for this project.

Request Body:

{
  "homeMobileCountryCode": 412
}

Response:

{
    "error": {
        "code": 404,
        "message": "Requested entity was not found.",
        "errors": [
            {
                "message": "Requested entity was not found.",
                "domain": "global",
                "reason": "notFound"
            }
        ],
        "status": "NOT_FOUND"
    }
}
Hemant
  • 3,893
  • 6
  • 27
  • 22

1 Answers1

1

I was facing this same issue. Then I looked up my billing account which was not linked. After linking it I tried to request it again via postman and it does give me a response with lat long and accuracy

Request 1

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

  ]
}

Request 2

{
     "homeMobileCountryCode": 412
}

Response against both the request

{
"location": {
    "lat": 31.473738999999995,
    "lng": 74.253135
},
"accuracy": 1528
}
Moeez
  • 494
  • 9
  • 55
  • 147
  • 1
    Thanks for your answer. I can confirm that disabled billing was also giving me 404 errors. I would never have thought to look at billing - they should really return a different error code. – cbreezier Feb 25 '21 at 23:31