<script>
function openPopupWindow() {
var winWidth=570;
var winHeight=700;
var left = (screen.width-winWidth)/2;
var top = (screen.height-winHeight)/2;
window.open('https://console.cloud.google.com/google/maps-hosted', 'Quick Start Widget',
'resizable=yes,width='+winWidth+',height='+winHeight+',left='+left+',top='+top);
return false;
}
</script>
<!-- CTA to generate Google Maps API Key -->
<button type="button" onClick="openPopupWindow()" style="color: white; background-color: #1a73e8" href="#">
Get an API Key
</button>
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-06-26。"],[],[],null,["# Quickly onboard Google Maps Platform plugin users\n\n\u003cbr /\u003e\n\n[](/static/maps/third-party-platforms/images/quickstart-widget.png)\n\nIf you're developing a Google Maps Platform plugin for\nplatforms such as WordPress, Shopify, Magento, and others, this topic\ndescribes how to quickly onboard plugin users to Google Maps Platform and\ngenerate an API key.\n\nThe API key, which your plugin needs to send with each request to\nGoogle Maps Platform, is tied to the user's Google account and\nbilling information and unlocks access to the map-building features\nin your plugin.\n\nTo help plugin users quickly generate an API key, provide a link or button\nthat launches the Quick Start Widget, a convenient popup window that\nwalks users through a few simple steps. The Quick Start Widget also\nkeeps plugin users in your platform rather than sending them off to the\nGoogle Cloud console to perform those tasks in multiple windows.\n\nLaunch the Quick Start Widget\n-----------------------------\n\nThe Quick Start Widget is just a web page whose window size you can\ncontrol with a JavaScript `window.open` call. For example: \n\n```gdscript\n\u003cscript\u003e\n function openPopupWindow() {\n var winWidth=570;\n var winHeight=700;\n var left = (screen.width-winWidth)/2;\n var top = (screen.height-winHeight)/2;\n\n window.open('https://console.cloud.google.com/google/maps-hosted', 'Quick Start Widget',\n 'resizable=yes,width='+winWidth+',height='+winHeight+',left='+left+',top='+top);\n return false;\n }\n\u003c/script\u003e\n\n\u003c!-- CTA to generate Google Maps API Key --\u003e\n\u003cbutton type=\"button\" onClick=\"openPopupWindow()\" style=\"color: white; background-color: #1a73e8\" href=\"#\"\u003e\n Get an API Key\n\u003c/button\u003e\n```\n\nSee it in action:\nGet an API Key\n\nWhen a user clicks the button, the Quick Start Widget opens in a popup\nwindow and does the following as the user moves through the widget:\n\n- Creates a Google account and project, if the user doesn't already have those.\n- Enables Google Maps Platform APIs.\n- Generates an API key for users to copy and paste into the plugin configuration.\n\nIf the plugin user already has a Google account and project, the widget\ntakes them to the \"Credentials\" page in the Google Cloud console, where\nthey can get an existing API key or create a new one.\n\nYou can point your plugin users to the\n[About the Quick Start Widget](/maps/third-party-platforms/quick-start-widget-users)\ntopic for more information.\n\nFrequently asked questions\n--------------------------\n\n### Do I have to pay to use the Quick Start Widget?\n\nNo. The Quick Start Widget is free and available to all developers\nto simplify Google Maps Platform onboarding.\n\n### Can the Quick Start Widget only be used on WordPress and Shopify?\n\nThe Quick Start Widget can be used on any third-party website, not just on\nwebsite builders or ecommerce sites.\n\n### Can the third-party platform view the billing information a user enters?\n\nAfter users authenticate with Google, their billing and other information is accessible\nonly to them. Third-party platforms and plugin developers cannot access that information.\n\n### Can I use my existing project and API key?\n\nIf you have an existing Google Maps Platform account, the Quick Start Widget\nredirects you to the to the Google Cloud console where you can either use an existing API key\nor generate a new one.\n\n### How do plugin users secure their API keys?\n\nThe [API security best practices](/maps/api-security-best-practices)\ntopic provides guidance on securing an API key. After using the\nQuick Start Widget, users also receive an email with instructions and\na link to the Google Cloud console to secure their API key."]]