Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is solution of this error:-Requests to this API must be over SSL

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?

like image 742
jaydev Avatar asked Apr 02 '14 09:04

jaydev


1 Answers

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)

like image 164
ElmoVanKielmo Avatar answered Nov 11 '22 17:11

ElmoVanKielmo