title: How does Google Maps secure their API Key? How to make something similar?
body: <p>Currently Google requires you to create an API Key that is specific to the domain of where the map will be served from. How does Google enforce this? I want to do the same thing.</p>
  
  <p>I expose an API for my service but want to allow clients to embed calls to the API via javascript and not just from the server. I could secure it with just a random token but of course this could be easily spoofed by anyone looking at the code on the client machine.</p>
  
  <p>I always understood this concept to not be possible but somehow Google does a good job at enforcing it.</p>
  
  <p>Edit - It sounds like Google really hasn't done anything amazing after all. Their API is most likely just for tracking and not really to guarantee that their API is used by the person with the key.</p>