I\'m trying to use the Google URL shortener API with PHP:
$apiKey = \'ABC\';
$url = \'http://www.stackoverflow.com/\';
$postData = array(\'longUrl\' => $
This is an app settings issue in the Google Developers Console. On the credentials screen it lists the IPs that are allowed to use the API Key. It's a security precaution to help protect the key if it leaks.
You need to edit allowed IPs to either be empty (less secure) or update it to include the actual IP of your server.