Create Google API Key
Last updated
Last updated
Even the API key is not compulsory for the app but it will help the app run smoothly, therefore we still recommend you to create an API key on your own for your business. There are 6 main steps to create an API key:
The first step that you need to take is creating a billing account. If you already owned a billing account, you can skip this step.
First, you go to the Google Cloud Platform Console and sign in to your account. Then, you click on the menu button and select Billing.
After that, you will see the Add billing account button on the My billing accounts tab. Click on that button and fill in all the required information including Name, Address, Card number,...
To let the API work, the Google platform asks you to enable billing for your project. One more time, click on the menu button and choose the Billing section.
Then, you just need to link the project with your billing accounts.
As our apps use 5 types of API, which are Direction, Geocoding, Geolocation, Maps JavaScript, and Place APIs, you need to check whether you enable these APIs or not.
Click on the menu button again and select APIs & Services and click on Library.
Then, you click on the View All button and choose these 5 above APIs.
If you have already enabled these APIs, the platform will show the Manage button.
Otherwise, it will show the Enable button for you. Click on that button to enable them for your project.
The next step that needs to be done is creating an API key. To create an API key, you also click on the menu button and select APIs & Services > Credentials.
On the Credentials page, you click Create credentials and choose API key.
Google platform will automatically create for you an API but you need to restrict this API.
To restrict the API you click on the Edit icon, the platform will bring you to the Restrict and rename API key page.
On this page, you can rename the API as well as restrict it. In case you have many APIs, you can rename it as "Store Locator", which makes it easier to keep track.
In the 'Application restrictions' part select None.
For the API restrictions, you select the "Restrict key" option and click on all 5 types of APIs, including Direction API, Geocoding API, Geolocation API, Maps Javascript API, and Places API.
The final step is applying the API key to the app. To do that, you open the app from your Shopify admin, then go to the Settings section and enter your API key into the API Key field in the General tab:
Don't forget to click on the Save and Publish to Shop buttons after you add the API Key to the app.