Google Server API Key Troubleshooting

Sometimes, when trying to validate the Google Server API Key a user might get the below error message. This happens when an incorrect IP address is extracted and pasted in the Google Cloud Console. Therefore, to resolve this issue, the correct IP address needs to be pasted in Google Cloud Console.

Server API Key Error
Server API Key Error

Furthermore, to solve this issue the IP address shown in the error message needs to be copied and pasted in Google Cloud Console. Simply follow the below steps to do this:

  1. Go to Google Cloud Console and go to the “Credentials” Section
  2. Select the API key you want restricted and click on the “Edit” Icon
Google Cloud Console: Credentials Section
Google Cloud Console: Credentials Section

  1. On the “ Restrict and rename API keys” page, go under “Application restriction”
  2. Select “IP addresses (web servers, cron jobs, etc)”
  3. Click on “ADD AN ITEM”
  4. Paste the IP address shown in the error message
Paste the IP Address in Key Restrictions
Paste the IP Address in Key Restrictions

Lastly, pasting the IP address will resolve the issue.

Finally, For more information about Google API keys and server API keys please visit this article at the link below:

Referrer Error Even After Removing the Referrer Restrictions #

If you’re encountering persistent referrer errors even after removing referrers from the Google Cloud Console, there are a few things to consider.

Firstly, ensure that you’ve indeed removed all referrers associated with your API key. This step is crucial, as the referrer settings could still restrict access.

blank
Example of two API keys without Restrictions

If the issue persists, it might be due to the use of incorrect API keys or the presence of other Google Maps libraries conflicting with your store locator. Double-check your API keys to make sure they match the changes you’ve applied in the Google Console. Additionally, inspect your website’s code to ensure that no other Google Maps libraries are loading alongside your store locator, as this can also lead to referrer errors.