I am trying to do a curl request to a google maps API using the following URL. When I do it from the browser I get back the right results but if I do it from a command line on the same machine I get an error (see below). What am I missing?
Curl request:
curl https://maps.googleapis.com/maps/api/directions/json?origin=San+Francisco,CA&destination=Mountain+View,CA&sensor=false&key=API_KEY
Output:
{
"error_message" : "Invalid request. Missing the 'destination' parameter.",
"routes" : [],
"status" : "REQUEST_DENIED"
}