Here is what I have done. Keep in mind that I am logged in to the browser as admin for a G Suite account under the domain in question.
- I go to PageSpeed Insights url https://developers.google.com/speed/pagespeed/insights/
- I enter my website into the box
ERROR: The referrer https://www.googleapis.com/ does not match the referrer restrictions configured on your API key. Please use the API Console to update your key restrictions
a. How does google know that I had not configured a key?
b. What key?
c. there is no link to "my" API console (I did not know I had one)
Search API Console and get (eventually): https://console.developers.google.com/apis/
- Stare and despair..."Page not viewable for organizations. To view this page, select a project" (what?). I see credentials (don't click it, not yet, i did, you'll regret it)
- Looooooooong story short, I figure I have to create a project first.
- At this point I have no idea what I am doing, WHAT I am creating or especially: WHY.
- click on Enable Apis, select PageSpeed, Click on Create blah blah blah.
- Now click Create credentials (we are back to the api page). This is a delightful nightmare... the important part, in "calling it from" USE: "a server", is the only one that works! (wonder why the other choices, specially "from browser" since that seems to me is what I was doing)
- Now there is a key sitting there. Now what?
- I go to point 1 and repeat this list with tiny variations 50 times
Domain in question: https://niagarafallsbus.com