我可以公开分享我的 Google+ API 密钥吗? [英] Can I publicly share my Google+ API keys?

查看:28
本文介绍了我可以公开分享我的 Google+ API 密钥吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Google plus 开发应用程序.因此我需要一个 API 密钥.我已经在 API 控制台中生成了密钥.现在使用该密钥,我将使用 JSON 中的 JavaScript 从 Google+ 访问一些数据.但是在这种方法中,我的 API 密钥将是公开可见的.可以分享吗?

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?

我从这里得到的一些信息https://developers.google.com/console/help/#UsingKeys>

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

推荐答案

无法避免为客户端应用程序公开 API 密钥.为了确保没有其他人可以 (ab) 使用您的 API 密钥,您可以在 API 控制台中限制您的 API 密钥,以便它只能从您自己的域中使用,方法是定义允许的引用者"

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"

这篇关于我可以公开分享我的 Google+ API 密钥吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆