Quick Tip: Working with Google API

When working with any of Google’s API’s you are asked to specify a directory that a key will be generated for, if you work with a site on a local testing server you probably have come across the “this key is in use” when you specify localhost as explained in this post the key is to specify a unique host name.

To do this open your hosts file which will normally be found in /etc/hosts on a Unix system or windows/system32/drivers/etc hosts on a Windows system (xp pro/2000)

you should have a file that looks like this

127.0.0.1    localhost    computername

where computername is the unique name of your machine on the network I suggest you change this name to be unique, if its not there simply add it. When applying for your key use this name instead of localhost, just make sure its unique.

Written from vsgu7g1lapt0p

Tim

One Response to “Quick Tip: Working with Google API”

  1. Google Custom Search Engine « Venture Skills Blog Says:

    [...] If you are working on a test machine this quick tip on getting API keys may be helpful  Posted by ventureskills Filed in Technology, google, Venture [...]


Leave a Reply