blogger - 我应该对 Blogger 浏览器应用程序 API key 保密吗?

标签 blogger api-key

引用下图中突出显示的 API key ,我想知道用于浏览器应用程序的 Blogger API key 是否应该保密。

enter image description here

我问这个问题的原因是因为我计划写一篇关于在 JavaScript 中使用 Google Blogger API 的博客文章,并且希望公开提供一个使用该 API 的工作示例(以及代码示例中的 API key )在 jsFiddle 上。

这是我在documentation中找到的(突出显示值得注意的部分):

[...] When your application needs to call an API that's enabled in this project, the application passes this key into all API requests as a key=API_key parameter. Use of this key does not require any user action or consent, does not grant access to any account information, and is not used for authorization.

那么我是否可以假设我可以公开共享此 API key ,而不会冒有人利用它进行恶意行为的风险?

最佳答案

虽然仅通过 key 无法获取帐户信息、身份验证和其他信息,但它用于将 API 调用链接到 Google 项目。

如果 key 是公开可用的,人们可以使用它发出请求,并且 Google API 会将请求链接到您的 Google 项目。这可能会让恶意用户能够使用此 key 发送垃圾邮件请求,从而可能使您的帐户达到每日请求配额。

最终取决于您,但建议不要公开您的 API key 。

关于blogger - 我应该对 Blogger 浏览器应用程序 API key 保密吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16147291/

相关文章:

javascript - 在正则表达式模式匹配 url 上运行 javascript (Blogger)

html - 带有可悬停下拉菜单的文本框淡入淡出

ruby-on-rails - 公共(public)铁路应用程序中的敏感数据存储在哪里?

php - 是否可以只允许使用一个 API key 访问 Laravel API?

android - Google Maps API V2 - 总是出现身份验证错误

html - 从以下小部件中删除 "with Google Friend Connect"文本

html - Google Blogger 的相关文章小工具

html - 有限的博客文章出现在主页和标签搜索中

java - android 将 api key 存储在专用类与字符串文件中

javascript - 在 JS 设置中隐藏 API key