To access your Shopify store’s data from an app or via the API, you need an API access token. This token is valid for 24 hours, so you’ll need a process to refresh it when it expires.
This guide will walk you through the steps to set up a connector for Shopify with Knots that automatically handles this process for you. To follow this guide, you’ll need your Shopify store URL. By the end of this article, you will have the Client ID and Client Secret required to use the Shopify integration.
Generate Client Id and Secret for Shopify
Navigate to the Shopify Dev Dashboard
You can access the Shopify Dev Dashboard from your Shopify owner's account:
- Start by logging in as the store owner.
-
Go to the Apps options in the admin interface sidebar.
-
Select Apps settings in the dropdown menu.
-
Go to Develop apps.
-
Click on Build apps in Dev Dashboard.
Create and install a custom app on the Shopify Dev Dashboard
On the dev dashboard you will need to create an app, to save that app's credentials and to install the app on your store to be able to request an API access token and access your store's data.
To create an app, follow these steps:
-
Click Create app.
-
Provide a name for your app and click on Create.
-
Navigate to the Versions tab in the left sidebar of your app then click on Create version.
-
In the Access section write or select the scopes you want to allow for your access token.
In the URLs section put this default value in App URL : https://shopify.dev/apps/default-app-home
Click Release to finish creating the version
In the following example, we picked 'write_customers' and 'read_customers'; you may need to select more scopes depending on your API needs. For detailed access scope information: Shopify API access scopes. - Navigate to the Settings tab in the left sidebar.
Copy the Client Id and Secret of the app, you will need them to create a connector after completing this guid.
- To access to all scopes even restricted ones like read_customers you must make your app a custom app. To do so go to your app overview page by clicking the app name in the left sidebar.
Click on Select distribution method.
-
Select Custom distribution and click on Select.
- Fill in your store's myshopify.com domain and click Generate link.
-
Copy the link and open it to navigate to the install page.
When prompted select the store you want to install the app on. This is important because you can only access a store's data if the app is installed for that store. - On the install page it show the name of your app and the scopes you selected earlier when creating the version. Click on Install to continue.
- Navigate to this page to create a connector: https://app.knots.io/modules/connectors
Select Shopify in the System field
In Shopify subdomain fill in the domain of your shop
Fill in the Client Id and Secret you copied from your app earlier
Click on Setup connector
You can now use this connector in Studio, Flow and other Knots apps that support Shopify. The connector will automatically retrieve and maintain an API access token when it is used.
Need help or want to learn more about Knots automations?
Feel free to reach out to us at support@knots.io or get in touch via our contact form.
Comments
0 comments
Please sign in to leave a comment.