Google API keys - What is server key and browser key

后端 未结 3 808
感情败类
感情败类 2020-12-29 20:31

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



        
3条回答
  •  梦毁少年i
    2020-12-29 21:25

    This is relevant again now that Google just recently deprecated Browser Keys for its Web Services APIs.

    Here are the current definitions:

    Server keys

    Create and use a server key if your application runs on a server. Do not use this key outside of your server code. For example, do not embed it in a web page. To prevent quota theft, restrict your key so that requests are only allowed from your servers' source IP addresses.

    Browser keys

    Create and use a browser key if your application runs on a client, such as a web browser. To prevent your key from being used on unauthorized sites, only allow referrals from domains you administer.

    (from https://developers.google.com/console/help/new/)

提交回复
热议问题