I am using Google Place API for getting the distance between two cities, but when I call the service via http://maps.googleapis.com/maps/api/distancematrix/json?origins=dehli&destinations=pune&mode=bicycling&language=en-EN&sensor=true&key=AppKey the service gives this response:
{
"destination_addresses": [ ],
"error_message": "Requests to this API must be over SSL.",
"origin_addresses": [ ],
"rows": [ ],
"status": "REQUEST_DENIED"
}
What's the solution for this problem?
HTTP over SSL protocol URLs are prefixed with https://
and not http://
.
Change http://maps.googleapis.com/maps/api/distancematrix/json?origins=dehli&destinations=pune&mode=bicycling&language=en-EN&sensor=true&key=AppKey(paste App Key)
to https://maps.googleapis.com/maps/api/distancematrix/json?origins=dehli&destinations=pune&mode=bicycling&language=en-EN&sensor=true&key=AppKey(paste App Key)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With