We strongly recommend installing the Patchworks app from the Shopify marketplace - this creates a connector and adds an authenticated connector instance, seamlessly - there's no need for you to obtain your own tokens for authentication and apply them to your connector instance manually.
However, if for some reason you do need to create/update a Shopify instance manually, this guide shows how to obtain a Shopify token.
When a user chooses to add a connector instance using token-based authentication, the credentials below are prompted:
Credential | Required? | Notes |
---|---|---|
Whenever a process flow sends a Shopify API request using token-based authentication, Shopify's X-Shopify-Access-Token
option is passed in the request header. The value is set to whatever token was provided when the associated connector instance was added.
To obtain an API token, you must access your Shopify admin portal and create/install a new Patchworks Integration app. At the end of this procedure, you will be given an API token - this token should be used when adding connector instances for your Shopify store for use in process flows.
The steps required are summarised below.
Step 1 Log into the Shopify admin portal for your store.
Step 2 Select apps from the left-hand navigation menu:
Step 3 Select App and sales channel settings:
Step 4 Check the URL at the top of the left-hand navigation panel and add it to your password manager, ready for your Patchworks setup:
This is the same URL that you use to log into the admin portal.
Step 5 Click the develop apps for your store button:
Step 6 Click the create an app button:
...the create an app form is displayed:
Step 7 In the app name field, enter an appropriate name. For example:
If you're creating this app to work with a Patchworks blueprint, there may be a dependency on this name in your installed process flows. Please check the installation guide for any specific requirements for this name.
Step 8 Select an app developer from the dropdown list. This can be the store owner or any staff/collaborator account with the develop apps permission.
Step 9 Click the create app button:
...details for the new app are shown:
Step 9 Go directly to stage 2.
Step 1 Click the configure admin API scopes button:
Step 2 From the admin API access scopes page, select checkboxes to enable all API access scopes:
Step 3 Scroll down to the webhook subscriptions panel and ensure that the (latest) option is selected from the dropdown list:
Step 4 Click the save button at the end of this page:
Step 5 Go directly to stage 3.
Step 1 Click the install app button at the top of the page:
...the API credentials page is displayed.
Step 2 In the top admin API access token panel, click the reveal token once option:
Step 3 Copy this token and add it to your password manager, ready for use in your Patchworks setup:
c
store_name
The URL used to access a Shopify store always follows the convention:
https://your-store-name.myshopify.com
. For example, the URL for our 'Patchworks Docs Demo' store is:
https://patchworks-docs-demo.myshopify.com
When adding credentials for a new instance, you only need to provide the name of your store - don't enter https://
and don't enter .myshopify.com
. So taking our example, the store would be entered as: patchworks-docs-demo
.
token
Generated in your Shopify admin portal - see the Obtaining credentials tab.