{"id":22340,"date":"2016-06-24T19:04:23","date_gmt":"2016-06-24T19:04:23","guid":{"rendered":"https:\/\/wpgeodirectory.com\/docs\/?p=22340"},"modified":"2018-09-12T10:42:59","modified_gmt":"2018-09-12T10:42:59","slug":"add-google-api-key","status":"publish","type":"post","link":"https:\/\/wpgeodirectory.com\/docs\/add-google-api-key\/","title":{"rendered":"Add Google API KEY"},"content":{"rendered":"<ol>\n<li>You can find the setting in GeoDirectory under <em><strong>GeoDirectory &gt; Design &gt; Map &gt; Google Maps API KEY:<\/strong><\/em><br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api2.png\" alt=\"\" width=\"679\" height=\"190\" \/><\/li>\n<li>Log into your Google account in another tab or window.<\/li>\n<li>Click on <em><strong>Generate API Key<\/strong><\/em>.<\/li>\n<li>In the popup, select <em><strong>Create a new project<\/strong><\/em>:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api3.png\" alt=\"\" width=\"616\" height=\"193\" \/><\/li>\n<li>When the popup shows the New Project, change the name if you like, and then click <em><strong>Create and enable API<\/strong><\/em>:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api4.png\" alt=\"\" width=\"616\" height=\"191\" \/><\/li>\n<li>Copy the key from the next screen:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api5.png\" alt=\"\" width=\"604\" height=\"287\" \/><\/li>\n<li>Close the popup.<\/li>\n<li>Paste the key in the API key field:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api6.png\" alt=\"\" width=\"529\" height=\"39\" \/><\/li>\n<li>Scroll to the bottom of the page and <em><strong>Save<\/strong><\/em>.<\/li>\n<li>Once you have it up and running, you may want to restrict the API to your website domain by clicking on\u00a0<em><strong>Generate API Key<\/strong><\/em>, selecting the project you created earlier and go to the API console:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api7.png\" alt=\"\" width=\"626\" height=\"357\" \/><\/li>\n<li>Under <em><strong>credentials<\/strong><\/em> for the key created, select <em><strong>HTTP referrers<\/strong><\/em>, and then add <strong><span style=\"color: #0000ff;\">*.mysite.com\/*<\/span><\/strong> (change to your domain) in the HTTP referrers field, and then <em><strong>Save<\/strong><\/em>:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api8.png\" alt=\"\" width=\"611\" height=\"418\" \/><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3>Versions 1.6.10 of the GD core plugin and earlier:<\/h3>\n<p>You can find the setting in <em><strong>GeoDirectory under GeoDirectory &gt; Design &gt; Map &gt; Google Maps API KEY<\/strong><\/em><\/p>\n<ol>\n<li><a href=\"https:\/\/console.developers.google.com\/flows\/enableapi?apiid=static_maps_backend,street_view_image_backend,maps_embed_backend,places_backend,geocoding_backend,directions_backend,distance_matrix_backend,geolocation,elevation_backend,timezone_backend,maps_backend&amp;keyType=CLIENT_SIDE&amp;reusekey=true\" target=\"_blank\" rel=\"nofollow&quot;\">Go to this link to start<\/a> (you will need a google account)<\/li>\n<li>Click Continue to add a new project (or you can select a current one)<img class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/gkey1.png\" alt=\"\" \/><\/li>\n<li>If you see this message: &#8220;<strong>You don\u2019t have permission to create an API key<\/strong>&#8221; follow this step, if not skip to the next step.<br \/>\n<a href=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/permissions.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-22465\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/permissions.png\" alt=\"permissions\" width=\"337\" height=\"83\" srcset=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/permissions.png 337w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/permissions-300x74.png 300w\" sizes=\"(max-width: 337px) 100vw, 337px\" \/><\/a><\/p>\n<blockquote><p>It means exactly what it says.<br \/>\nYou\u2019ll need to create new credentials before an API key can be generated.<\/p>\n<p>Click on the \u201cCredentials\u201d link in the left hand sidebar<br \/>\nClick the \u201cCreate credentials\u201d button<br \/>\nSelect the \u201cAPI Key\u201d option<br \/>\nThen click the \u201cBrowser key\u201d button from the pop-up<br \/>\nNow you\u2019ll be taken back to the create a browser key step above and can proceed.<\/p><\/blockquote>\n<\/li>\n<li><strong>It is important you follow this step exactly<\/strong>:<br \/>\nYou will need to add two urls here,enter the name of your project and the url of your site, add one as: <strong>*.yoursite.com\/* <\/strong><br \/>\nAND one as <strong><br \/>\nyoursite.com <\/strong><br \/>\nas shown below:<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/gkey21.png\" alt=\"gkey2\" width=\"622\" height=\"303\" \/>You will then be presented with your API KEY:<br \/>\n<img class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/gkey3.png\" alt=\"\" \/><br \/>\n<a name=\"current\"><\/a>If you already have a project with a verified domain, you might be presented with a different screen, in that case select those settings to get your API key:<br \/>\n<img loading=\"lazy\" class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/api1.png\" alt=\"\" width=\"637\" height=\"379\" \/><\/li>\n<li>Copy and paste your API KEY into your GeoDirectory Settings and click save:<img class=\"greenborder\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/gkey4-1024x309.png\" alt=\"\" \/><\/li>\n<li>Wait for a while before checking, Google says this can take 5 minutes but we have found it to take up to 15 minutes in some cases.<\/li>\n<\/ol>\n<p>Once\u00a0that is all done, you can happily use google maps \ud83d\ude42<\/p>\n<h2 style=\"color: red;\">If you did not use our tutorial link or you already have a current project:<\/h2>\n<p>&#8230;If you did not use the link we provided to create a new API key they you will have to manually activate several API&#8217;s:<\/p>\n<ol>\n<li>In your API project click &#8220;Overview&#8221; and then &#8220;Enabled API&#8217;s&#8221;<br \/>\n<a href=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/overview.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-22467\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/overview.png\" alt=\"overview\" width=\"530\" height=\"209\" srcset=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/overview.png 530w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/overview-300x118.png 300w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/a><\/li>\n<li>Make sure the below APIs are enabled:<br \/>\n<a href=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/apis.png\"><img loading=\"lazy\" class=\"alignnone size-full wp-image-22468\" src=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/apis.png\" alt=\"apis\" width=\"460\" height=\"304\" srcset=\"https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/apis.png 460w, https:\/\/wpgeodirectory.com\/docs\/wp-content\/uploads\/sites\/3\/2016\/06\/apis-300x198.png 300w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><\/li>\n<li>If they are not all enabled then click &#8220;Google API&#8217;s&#8221; and search for them and enable them.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>You can find the setting in GeoDirectory under GeoDirectory &gt; Design &gt; Map &gt; Google Maps API KEY: Log into your Google account in another tab or window. Click on Generate API Key. In the popup, select Create a new project: When the popup shows the New Project, change the name if you like, and &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/wpgeodirectory.com\/docs\/add-google-api-key\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Add Google API KEY&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1670,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1,3],"tags":[],"amp_validity":null,"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/22340"}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/users\/1670"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/comments?post=22340"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/posts\/22340\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/media?parent=22340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/categories?post=22340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/docs\/wp-json\/wp\/v2\/tags?post=22340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}