3

I am trying to use the Google Roads API but it is returning an error when I use the example!

If I type the following URL into my browser I get the following response:

https://roads.googleapis.com/v1/speedLimits?path=51.4907313,-0.2160447|51.4905303,-0.2139847&key=*******

I have replaced my API key with asterisks for obvious reasons.

Response:

{
"error": {
"code": 404,
"message": "Requested entity was not found.",
"status": "NOT_FOUND"
}
}

How can I fix this?

Please note that I am a newbie regarding Google APIs.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
tim.tub
  • 69
  • 2
  • 7

1 Answers1

2

You most likely do not have a billing Account associated to your Google API project. The same thing happened to me. Since I have set up a billing account and added this to the API project the requests are working as expected.

See: How to add a Google billing account and How to modify a projects billig account

hbertsch
  • 367
  • 2
  • 12
  • I don't undestand why this answer was downvoted. This actually solved my issue when I got 404 message when using snapToRoads API. Although it doesn't match with google troubleshooting as they claim that you should get 403 instead, which makes things a bit more confusing. But nevertheless, this solved my 404 error – Kkulikovskis Apr 10 '20 at 16:30
  • Isn't there anyway to test the Roads API without setting up a billing account? I just want to try it, not to use it. – Mohamed Medhat Oct 16 '21 at 11:39
  • No, I doubt it. I had to set one up in order to test it. However, it is free. – hbertsch Oct 25 '21 at 08:32