{"id":592943,"date":"2017-12-07T12:02:53","date_gmt":"2017-12-07T12:02:53","guid":{"rendered":"https:\/\/toolset.com\/?post_type=course-lesson&#038;p=592943"},"modified":"2025-04-02T09:49:20","modified_gmt":"2025-04-02T09:49:20","slug":"creating-a-maps-api-key","status":"publish","type":"course-lesson","link":"https:\/\/toolset.com\/es\/course-lesson\/creating-a-maps-api-key\/","title":{"rendered":"Creating an API Key for Using Google and Azure Maps"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Account and billing information<\/h2>\n\n\n\n<p>To&nbsp;get an API key for the map service of your choice, you&nbsp;<strong>must&nbsp;<\/strong>set up an account billing information. This is true for both&nbsp;<a href=\"https:\/\/developers.google.com\/maps\/billing\/important-updates\" target=\"_blank\" rel=\"noreferrer noopener\">Google Maps<\/a>&nbsp;and&nbsp;<a href=\"https:\/\/azure.microsoft.com\/en-us\/pricing\/details\/azure-maps\/\" target=\"_blank\" rel=\"noreferrer noopener\">Azure Maps<\/a>. Then,&nbsp;your account will have a limited amount of free API calls that can be made each month. If you cross that limit, your account will automatically be charged.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating an API key for Google Maps<\/h2>\n\n\n\n<div class=\"wp-block-toolset-blocks-container tb-container\" data-toolset-blocks-container=\"412a3be0d23e940d2e0c38fa3e4332ac\">\n<div class=\"tb-fields-and-text\" data-toolset-blocks-fields-and-text=\"3e1d2592ce20bdf2bf813c9dfa44c991\"><p>To protect your API key from unauthorized usage and charges, it&#8217;s important to add domain restrictions to it. By setting restrictions, you can specify the websites that are allowed to use your API key, preventing unauthorized access from other sites. You can set these restrictions in the Google settings for your API key.<\/p><\/div>\n<\/div>\n\n\n\n<p>If you do not have an account for Google Maps, go to the&nbsp;<a href=\"https:\/\/cloud.google.com\/maps-platform\/\" target=\"_blank\" rel=\"noreferrer noopener\">Google Maps Platform page<\/a>&nbsp;and click the&nbsp;<strong>Get Started&nbsp;<\/strong>button:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>In the pop-up dialog that appears, make sure to select&nbsp;<strong>Maps JavaScript API<\/strong>, <strong>Geocoding API<\/strong>, and <strong>Places API<\/strong>.<\/li>\n\n\n\n<li>In the next step, enter the name for your project (site).<\/li>\n\n\n\n<li>You will be redirected to a Google Maps Platform page for setting up your billing information. Follow the wizard to complete registration.<\/li>\n<\/ol>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Once your account billing is set up, follow the steps outlined in the official Google Maps documentation for&nbsp;<a href=\"https:\/\/developers.google.com\/maps\/documentation\/embed\/get-api-key\" target=\"_blank\" rel=\"noreferrer noopener\">getting the API key<\/a>. If you already have existing projects using Google Maps API, please follow the steps in the&nbsp;<a href=\"https:\/\/cloud.google.com\/maps-platform\/user-guide\/\" target=\"_blank\" rel=\"noreferrer noopener\">official guide for existing users<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Creating an API key for Azure Maps<\/h2>\n\n\n\n<p>If you do not have an account for Azure Maps, go to the&nbsp;<a href=\"https:\/\/azure.microsoft.com\/en-us\/free\/\">Microsoft Azure page<\/a>&nbsp;and click the&nbsp;<strong>Start free&nbsp;<\/strong>button. Follow the wizard to create your account and set up your billing information. Once your account billing is set up, follow the steps outlined in the official guide for&nbsp;<a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/azure-maps\/how-to-manage-account-keys\">managing your Azure Maps account and keys<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Entering the maps API keys<\/h2>\n\n\n\n<p>Once you have the maps API key for your site, you need to enter it in Toolset settings. Go to the&nbsp;<strong>Toolset<\/strong>&nbsp;\u2192&nbsp;<strong>Settings<\/strong>&nbsp;page and click the&nbsp;<strong>Maps<\/strong>&nbsp;tab. There, select which API you want to use and enter the API key.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\" tb-image tb-image-dynamic tb-image-frame-none aligncenter\" data-toolset-blocks-image=\"bf8161fc0fe06237581741e152dfe5c9\"><a href=\"https:\/\/toolset.com\/wp-content\/uploads\/2025\/03\/toolset-settings-google-map-api-key.png\"><img decoding=\"async\" loading=\"lazy\" src=\"https:\/\/toolset.com\/wp-content\/uploads\/2025\/03\/toolset-settings-google-map-api-key-500x274.png\" alt=\"\" class=\"wp-image-2802594\"\/><\/a><figcaption><div class=\"tb-image-caption\">Maps API key settings<\/div><\/figcaption><\/figure>\n<\/div>\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Prefer not to create an API key?<\/h2>\n\n\n\n<p>If you prefer not to create an API key, you can use OpenStreetMap with Toolset Maps. OpenStreetMap requires no account, no billing setup, and no API key. You can start building maps right away.<\/p>\n\n\n\n<div style=\"height:30px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Known Issues<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Problems with displaying markers on Google Maps<\/h3>\n\n\n\n<p>If Google Maps API key is restricted by domain, that may not work for users with multiple domains or subdomains. To&nbsp;solve this, you can enter a second API key for Google Maps, in the Toolset settings. When added, this second key is used exclusively for server-side requests. This means it is never exposed in HTML and does not need restrictions. If you want extra security, you can restrict it, but only by IP addresses, not by domains.<\/p>\n","protected":false},"author":4341,"featured_media":1666499,"template":"","related-lesson":[8423],"class_list":["post-592943","course-lesson","type-course-lesson","status-publish","has-post-thumbnail","hentry","related-lesson-maps"],"_links":{"self":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/592943","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson"}],"about":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/types\/course-lesson"}],"author":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/users\/4341"}],"version-history":[{"count":8,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/592943\/revisions"}],"predecessor-version":[{"id":2803812,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/course-lesson\/592943\/revisions\/2803812"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media\/1666499"}],"wp:attachment":[{"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/media?parent=592943"}],"wp:term":[{"taxonomy":"related-lesson","embeddable":true,"href":"https:\/\/toolset.com\/es\/wp-json\/wp\/v2\/related-lesson?post=592943"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}