Skip to content

Does the API key need to be public to be used? (Discussion) #247

Discussion options

You must be logged in to vote

Yes, there is no way to load the Google Maps Api in the browser without also providing the API key in the browser (which is public for everyone).

Basically there are three ways to protect your key and usage:

  • Website referrer restrictions (as you already did)
  • API restrictions (only allow Maps API/Places API for a specific key for example)
  • Add quota restrictions for a key or an API (certain amount of requests per hour/day/user)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@spenserschwartz
Comment options

Answer selected by spenserschwartz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants