Can I publicly share my Google+ API keys?

孤街醉人 提交于 2019-12-12 02:25:08

问题


I am developing an application with Google plus. Hence I need an API key. I have generated the key in API console. Now using that key I am going to access some data from Google+ using JavaScript in JSON. But in this method my API key will be publicly visible. Is it OK to share it?

Some information I got from here https://developers.google.com/console/help/#UsingKeys


回答1:


Having API Keys public for client-side applications can't be avoided. To make sure no other people can (ab)use your API Key you can limit your API Key in the API console, so that it can only be used from your own domain, by defining "allowed referers"



来源:https://stackoverflow.com/questions/17619181/can-i-publicly-share-my-google-api-keys

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!