PROVIDER SETUP DOCS
Integrating with Shopify
13min
pathfix allows you to easily add end user oauth based integration, handling authorization and enable communication between your app and box in just a few minutes before proceeding, you will first need to register your application with box please refer the developer documentation provided by box add your app in shopify shopify allows for apps to be installed in 2 ways from your app interface (e g an integration page in your app) via their marketplace please follow the below instructions for the installation method of your choice create shopify developer app log in to your shopify developer account ( https //partners shopify com/ https //partners shopify com/ ) click on apps from the left navigation and click on create new app select create app manually on the right, give it a name and click create from the next screen, copy the client id and client secret for use in your pathfix configuration setup in pathfix we need to complete the setup in pathfix and come back to shopify to complete the configuration log in to your pathfix account, select the application and click on shopify add the copied client id and client secret in the configuration, modify the scopes as per your requirement and hit save click on the keys section on the left navigation bar and copy your pathfix public key for use in the shopify developer portal configure shopify app we now need to complete the configuration in shopify developer, navigate back to shopify developer for illustration purposes, lets assume the following values as examples through this setup ( please replace with values accordingly at your end ) fields sample values pathfix public key 1087ad7d f7af 48ed 9691 3209ec3a41fc pathfix private key c7da8fff 5ad6 4227 93d3 e2380e29e95y your app domain https //acme com app integration page https //acme com/integration user's shop name betty's market click on configuration (under build) under app url, enter the following as the app url (replace the public key and your app domain) https //labs pathfix com/integrate/command?pfx store=store shopify 1087ad7d f7af 48ed 9691 3209ec3a41fc pre\&consented redirect= https //acme com under allowed redirect url, enter the pathfix redirect url save the changes, your setup is complete shopify auth flows when installing from shopify marketplace, the shop is pre selected and a change in the app url is needed there are a few changes in the flow that needs to be considered when installing from the shopify marketplace please follow the steps as shown exactly to avoid errors flow 1 (from your app interface) for purpose of this flow, we will assume your app database looks something like this (notice the id value and the pathfix shopify user id , they are the same) the authorization/auth process is initiated from your app via a connect button placed on your integration page the setup for this is standard, please follow the documentation for end user authorization docid\ mscmngugrsgrzscmlcixf enable pass through api docid\ jidaxepnr2owz8w4 jpbk flow 2 (via the shopify marketplace) when the auth process is initiated from the shopify marketplace, the setup is different as you do not need to put a connect button in your app once you have published your app to the marketplace, shopify will ask your user to select a shop to install the app into after the user selects the shop they wish to install it to, shopify will redirect the user to the url specified in the app url, that is configured above, with some additional encrypted information pathfix has all the information to complete the authorization but there is no information regarding the user id of acme com that initiated the request this is a key difference from the previous process pathfix completes the authorization and assigns a user id itself when redirecting to https //acme com post authorization, the url looks something like this https //acme com?pathfix user id= shopify cfcc1817 c53f 66ef a090 c31ec0ef22e5 pathfix assigns a temporary user id for the auth'd user as shown/highlighted in the url above as pathfix user id your app has to store the pathfix user id against the user that subsequently logs in e g image below note now that the values for id and the pathfix shopify user id are different, this is how you will need to save the value returned from the querystring making api calls you can now make api calls for the connected user as shown in the enable pass through api docid\ jidaxepnr2owz8w4 jpbk documentation instead of using the id/unique id value, you will need to use the pathfix shopify user id value instead for the user id field to add the integration to your bubble app, please follow this documentation bubble io setup https //docs pathfix com/bubble need help? reach out to us at support\@pathfix com and we would be happy to assist!