The following are the steps to restrict Google API key using HTTP referrers:
Go to the Google Cloud Console and select your project.
Click on the hamburger menu icon, then go to the API & Services section and select Credentials.
Locate the API key that you want to restrict and click on the Edit button beside it.
Scroll down until you see the Key restriction section and select HTTP referrers.
Under the Accept requests from these HTTP referrers section, add the domain names that you want to allow access to the API key. You can add multiple domains by separating them with commas.
Under the Application restrictions section, select the HTTP referrers option.
Save the changes by clicking on the Save button.
Once you have completed these steps, only the domains that you have specified will be able to access your Google API key. Any requests made from domains not on the list will be denied.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2021-06-16 11:00:00 +0000
Seen: 20 times
Last updated: Nov 01 '21
How can one obtain live data from interactive broker through API?
Why am I not getting a response when making a URL call in ASP.NET Web API?
Is it possible to have multiple docks in a single project using rswag rails?
How can I retrieve folders using the Vimeo API?
How can the integration between Ready API tool and Zephyr squad be accomplished?
Does Amazon SP API have a designated endpoint to obtain a seller's identification?