google-apigoogle-plushttp-status-code-403google-plus-domains

APIs Explorer ipRefererBlocked


How to use Google API Explorer?

https://developers.google.com/apis-explorer/#p/plusDomains/v1/plusDomains.people.get

I would like test Google+ Domains API and even via API Explorer I receive 403 error:

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "ipRefererBlocked",
    "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
 }
}

Solution

  • 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. As the picture

    You need to edit allowed IPs to either be empty (less secure) or update it to include the actual IP of your server. As the picture