{"id":8560,"date":"2020-05-29T17:59:29","date_gmt":"2020-05-29T12:29:29","guid":{"rendered":"https:\/\/magecomp.com\/support\/?post_type=manual_documentation&#038;p=8560"},"modified":"2020-05-29T17:59:29","modified_gmt":"2020-05-29T12:29:29","slug":"use-distance-based-shipping-extension","status":"publish","type":"manual_documentation","link":"https:\/\/magecomp.com\/support\/docs\/magento-2-distance-based-shipping-extension\/use-distance-based-shipping-extension\/","title":{"rendered":"To use Distance Based Shipping Extension"},"content":{"rendered":"<p>To use Distance Based Shipping Extension, you need to sign up an account with <a href=\"mailto:https:\/\/console.cloud.google.com\/\">Google Cloud Console.<\/a><\/p>\n<p>Create a New Project =&gt; Select Billing Account and Organization =&gt; Click on Create<\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"size-full wp-image-8564 aligncenter\" src=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-need-to-sign-up-an-account-with-Google-Cloud-Console..png\" alt=\"you need to sign up an account with Google Cloud Console.\" width=\"577\" height=\"536\" srcset=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-need-to-sign-up-an-account-with-Google-Cloud-Console..png 577w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-need-to-sign-up-an-account-with-Google-Cloud-Console.-300x279.png 300w\" sizes=\"(max-width: 577px) 100vw, 577px\" \/><\/p>\n<p>Once you see the new project Dashboard as shown below screenshot. Next step is we need to enable the APIs required to use this extension.<\/p>\n<p>From the left Menu =&gt; APIs and Services =&gt; Library<\/p>\n<p>Here are the 4 APIs you need to enable.<\/p>\n<ul>\n<li>Maps JavaScript API<\/li>\n<li>Distance Matrix API<\/li>\n<li>Geolocation API<\/li>\n<li>Places API<\/li>\n<\/ul>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-8563\" src=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable.png\" alt=\"4 APIs you need to enable\" width=\"1094\" height=\"602\" srcset=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable.png 1094w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable-300x165.png 300w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable-1024x563.png 1024w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable-768x423.png 768w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/4-APIs-you-need-to-enable-600x330.png 600w\" sizes=\"(max-width: 1094px) 100vw, 1094px\" \/><\/p>\n<p>Next We need to create credentials to generate the Google API which we need to configure in the extension backend.<br \/>\nClick on APIs &amp; services =&gt; Credentials<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-8562\" src=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/to-generate-the-Google-API.png\" alt=\"to generate the Google API\" width=\"725\" height=\"530\" srcset=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/to-generate-the-Google-API.png 725w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/to-generate-the-Google-API-300x219.png 300w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/to-generate-the-Google-API-600x439.png 600w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Create Credentials =&gt; API key<\/p>\n<p>You will see one popup showing API key, that\u2019s the key you need to configure in the extension configuration.<\/p>\n<p>Further, If you want to restrict the key, you can select the option from popup itself. You will see below screen and you can restrict it based on a domain like below.<\/p>\n<p>This is just for the security (Its optional step)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-8561\" src=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain.png\" alt=\"you can restrict it based on domain\" width=\"1348\" height=\"1064\" srcset=\"https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain.png 1348w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain-300x237.png 300w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain-1024x808.png 1024w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain-768x606.png 768w, https:\/\/magecomp.com\/support\/wp-content\/uploads\/2020\/05\/you-can-restrict-it-based-on-domain-600x474.png 600w\" sizes=\"(max-width: 1348px) 100vw, 1348px\" \/><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1891,"menu_order":2,"template":"","manualdocumentationcategory":[53],"manual_doc_tag":[],"class_list":["post-8560","manual_documentation","type-manual_documentation","status-publish","hentry","manualdocumentationcategory-m2-distance-based-shipping"],"_links":{"self":[{"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_documentation\/8560","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_documentation"}],"about":[{"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/types\/manual_documentation"}],"author":[{"embeddable":true,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_documentation\/8560\/revisions"}],"predecessor-version":[{"id":8565,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_documentation\/8560\/revisions\/8565"}],"up":[{"embeddable":true,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_documentation\/1891"}],"wp:attachment":[{"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/media?parent=8560"}],"wp:term":[{"taxonomy":"manualdocumentationcategory","embeddable":true,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manualdocumentationcategory?post=8560"},{"taxonomy":"manual_doc_tag","embeddable":true,"href":"https:\/\/magecomp.com\/support\/wp-json\/wp\/v2\/manual_doc_tag?post=8560"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}