Google API – Requests to this API must be over SSL

When we are using the Google API many times we are getting “Requests to this API must be over SSL” error like

{
    "destination_addresses": [ ],
    "error_message": "Requests to this API must be over SSL.",
    "origin_addresses": [ ],
    "rows": [ ],
    "status": "REQUEST_DENIED"
}

I am trying to fetch the lat and long from address using Google geolocation API.

http://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

I used SSL certified website and create the call from the SSL certified website on the “http://” So for that, i am getting this kind of error from google.

Just I need to change the “https://” instead of “http://” that is the solution¬† for this like

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA

Now, it’s working fine.

If you face any kind of issue on geolocation API write the comment below.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s