0

I'm just starting to use Google Maps APIs and I'm having some trouble when attempting to send a request via Postman to

[https://maps.googleapis.com/maps/api/distancematrix?<params>&key="key value"]

I've created an API Key in the Google Maps Console and I'm sending the key along with origins and destinations values however each time I attempt to send the request I'm receiving:

{
"destination_addresses": [],
"error_message": "The provided API key is invalid. ",
"origin_addresses": [],
"rows": [],
"status": "REQUEST_DENIED"

}

Now the odd thing is that I can call the Distance API using just fine. The results I receive from a call to:

https://maps.googleapis.com/maps/api/directions/json?<params>&key="key value"

returns a valid response.

I've checked and double checked the API key value and I'm sure it's being sent and it's the only key that I have generated.
Anyone have an idea what I'm missing?

0

1 Answer 1

0

After contacting google we determined that the problem is not with the request but with the JSON exported from the google maps api/Postman collection.
Changing the Authorization to none and manually adding the key as a parameter in a request corrected the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.