Accessing and processing data from Shopify to Google Sheets involves the use of APIs. Application programming interfaces, or APIs, gives its users a way to access the functions of an application or its data so that it can be processed by another application.
For this tutorial, we will access a Shopify API key that we can use to access its contents in another app like Google Sheets. We have already learned how to do so by using an external code and adding it as a script to your spreadsheet. What remains is to learn how to access a Shopify API key to make the code work.
Here are the steps:
Step 1: On the main sidebar on the left side of the main admin page, click Apps.
Step 2: On the Apps page, scroll down to the end of the page. Notice the following line:
Working with a developer on your shop? Manage private apps
Click the Manage private apps link.
Step 3: The Private apps pages will be loaded. A button labeled Create new private app is present on the upper-right corner of the page. Click the button.
Step 4: On the Create private app page, fill in the following details:
Next, scroll down to the section labeled Admin API and modify the permissions as needed. The permissions are needed to control what data can be accessed and whether the external app can write on the Shopify database or not.
Clicking the drop-down box lists the following options:
There is a huge amount of Shopify store data that you can access through your API, so take your time on this portion so that you don’t need to generate a new API key when you need new permissions.
While being optional, you are also asked if you want to use Shopify’s Storefront API. Storefront API is an advanced API that allows you more flexibility in connecting to your store. Checking this option offers you more options.
Step 5: Once you are done, click Save. A pop-up box will appear that will remind you of the importance of keeping your private API safe.
Once you have read the reminder, click Create app.
Step 6: Go back to the Private apps page by clicking the back arrow on the upper-left portion of the page (not the back button of the browser!). The new private app will be listed on the table in the Private apps page.
Click the listed private app name to access the API key.
A new table will appear on the page, which contains the API key and the password. A sample URL is also included so you don’t have to parse the API key and the password when using your external app.
And, voila! you have accessed an API key to your Shopify store. Don’t forget Shopify’s reminder:
You should only share the API key with those you trust to safely access your data. Use this private app responsibly.
Now you are ready to access Shopify store data with your external app!