I am getting access denied when I run this code. My API key is set to work with http


$indirizzo = 'Via Roma 27';
$cap = '38122';

$url = ''.str_replace('  


curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_VERBOSE, 0);
$geocoding = json_decode($result, true); // json data from API
echo $geocoding['status'];
if($geocoding['status'] == 'OK') {

    //request geocode data success
    echo $geocoding;


you can get more info from the API: var_dump($result);

what says to me

   "error_message" : "This API project is not authorized to use this API.",
   "results" : [],
   "status" : "REQUEST_DENIED"
Sponsor our Newsletter | Privacy Policy | Terms of Service