问题
我实际上还没有在任何地方看到这个问题得到充分解决。
我正在使用需要 Google map API key 的 WordPress 插件。我想知道的是,我可以对我管理的所有网站和应用程序使用一个 API key ,还是需要为每个资源或应用程序使用单独的 API key ?
例如,我很高兴地发现我只需要一个 Google 网站站长工具帐户,即可使用它来管理我的所有网站,包括我为他人创建的网站以及正在为其他人管理的网站。
但是,使用 Google map 就不太清楚。我制作的每个应用程序都需要单独的 API key 吗?
到目前为止我在哪里寻找答案:
- How Google Maps API Keys work
- Do I need to hide API key when using google maps js API? If so, how?
- Multiple Google Maps API keys
我从这些帖子中得出的结论是,您可以拥有多个 API key ,但您不需要任何 API key ,但有许多不同的风格 Google Maps API key (嗯?)...这有点令人困惑。
我的问题
如果我为客户 A、B 和 C 创建网站,“client-a.com”是否需要与“client-b.com”不同的 API key ?
注意
这个问题不仅仅与 Google map 有关,而且是导致困惑的实际 API。
最佳答案
- If I am making a website for clients A, B, & C does "client-a.com" need a different API Key than "client-b.com"?
通常是的。您将按域将各种 map API 列入白名单。而且您可能会受到速率限制。如果您需要将 key 分开,那么这更适合组织目的,并且如果您需要将费用转嫁给客户。
- Are there any "go-to" plain-English docs (not tech-manual-ese like a Perl man-page) that explain with good examples (Sitepoint has a really good way of explaining things with conversational writing, and walking you through WHY we do things in programming, not just how) when and where to use API keys and which ones to use?
谷歌刚刚大规模地重新洗牌了他们的 map 平台。最终的第三方指南可能需要一些时间才能编写出来。这是他们的 recent announcement .
- Can I let my friend borrow my API Key to build his app? What are the ramifications of doing such?
当然可以,但他可能会影响您的速率限制。
- Can I use a Google Maps API key for any other Google app (docs, sheets, YouTube, G+, etc.)? Is a Google API key universal to all apps that integrate/interface with a Google product?
仅适用于 Google map 。
关于api - 我需要多少个 Google map API key ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50537021/