Alex Rivera | Logout

Google API keys - What is server key and browser key

Asked 2013-07-18T05:56:31.357
29

I ma using google maps in my app, and use the URL as following format without the API key- values,

<script type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?sensor=SET_TO_TRUE_OR_FALSE">
    </script>

Now I need to use the API key to track the requests, according to the examples it needs to add another API key query string parameter,

<script type="text/javascript"
      src="https://maps.googleapis.com/maps/api/js?key=API_KEY&sensor=SET_TO_TRUE_OR_FALSE">
</script>

But, I received 2 keys, One for servers (IP address restrictions) and one for browser apps (domain level restrictions) are as follows:

Server Key: XXXX Browser Key: YYYYY

Which key should I use in my app, should I use both of them? Could not find a good article on this.

Edit
Report

1 Answer

5

Try the browser key, found this post, but it's written on 2012,

https://groups.google.com/forum/#!topic/android-gcm/Ir-dNtPRKcU

Found this on web: "2.Click Create new Server key. Either a server key or a browser key should work. The advantage to using a server key is that it allows you to whitelist IP addresses. The following screen appears:"

http://developer.android.com/google/gcm/gs.html

Hope this will help you!

answered 2013-07-18T06:12:27.587

Your Answer