• Resolved insightdes

    (@insightdes)


    Hi,

    5 minutes ago, I added two development sites to my Google Pagespeed Insights API key @ console.developers.google.com.

    When I try to run Google Pagespeed Insights plugin on either site, I receive the error:

    This referrer or IP address is restricted from using your API Key.

    I’ve confirmed the spelling is correct: in console.developers.google.com, I have entered the domains as https://dev1.example.com/* & https://dev2.example.com/* in the API restrictions. and https://dev1.example.com/ & https://dev2.example.com/ are the WP sites I am trying to start the tests on.

    Help appreciated.

    Steve

    • This topic was modified 6 years, 2 months ago by insightdes.
    • This topic was modified 6 years, 2 months ago by insightdes.
Viewing 1 replies (of 1 total)
  • Plugin Author Matt Keys

    (@mattkeys)

    This is an old topic I missed so you’ve probably already figured it out or moved on, but in case you are still wondering..

    This is something I run into constantly with the Google API key restrictions. No matter what I enter into the fields you described, Google blocks access from that key.

    From what I can discern Google thinks that all calls to the Pagespeed Insights API originate from https://www.googleapis.com, and not from whatever server you are making the API call from. If you enter https://*.googleapis.com I’ve found that the key works. Of course this means anyone can use the key in this way.

    This differs from expected behavior I have seen in other Google APIs like the Maps API. I believe it is simply broken/buggy, but I haven’t been able to get Google to comment on it in my years of trying to reach them about it.

Viewing 1 replies (of 1 total)
  • The topic ‘“This referrer or IP address is restricted from using your API Key.”’ is closed to new replies.