google-apps-scriptgoogle-custom-search

Google Custom Search Engine Error Code 403 : Access Not Configured


I am trying to use Google Custom Search API I followed Custom Search doc, i am done with the Control panel stuff and got the Search Engine ID as well, IMplemented API and got the API key from the developer console

Public API Access Key - AIzaSyC0m8w-NEP3yrKolboNbPLbhlhmHJc_cB0

Search Engine ID - 005717290701474541337:1mc_u_r_i94

https://www.googleapis.com/customsearch/v1?&key=AIzaSyC0m8w-NEP3yrKolboNbPLbhlhmHJc_cB0&cx=005717290701474541337:1mc_u_r_i94&q=paris

and after making the above request , i got this result

 {
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "accessNotConfigured",
    "message": "Access Not Configured. The API is not enabled for your project, or 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 configuration.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "message": "Access Not Configured. The API is not enabled for your project, or 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 configuration."
 }
}

I am not getting the expected results, so please help.. Thanks


Solution

  • Everything seems to be ok, it might be an API key Issue. Try to create an API key for browser it might work