GETTING STARTED
Introduction
End-user authorization
12min
this documentation will walk you through how you can setup the connect button (authorization) for your users to click to connect their accounts video walkthrough the following video gives you a quick walkthrough on how you can add oauth integrations if you are looking for step by step text guide, please continue reading this documentation pre requisites to get started, you need to register your app with the service provider each provider will have a dedicated developer space that will allow you to do this we have created the setup documentation for a few providers this can be found here integration setup guides docid 29lgyvegl5fcp4bajqujv if you need help identifying where to register your app with a particular provider, reach out to us and we will get back with the steps for it when asked for a redirect uri, enter the following pathfix uri https //labs pathfix com/integrate/command once you have registered, save the client id and client secret for use with pathfix configure provider integration add your application by clicking add application (or select an application from the list) (optional security step, see more here ) click on edit under your application, add your app domain and hit save select the application and pick a provider from the list (depending on the auth method offered by the provider, you can choose from oauth, identity, client key based or api key based integration) add the client id and client secret received from the provider add/edit the scopes you want to access and hit save test connection before proceeding, you will need to test the connection to make sure your setup, keys and scopes are correct here is how you can run a complete test before proceeding to add the connect button to your app once you have added the provider configuration, click on test connection you will be on the api playground where you can click and connect your account connect your account to proceed if your provider developer account has been setup correctly, you will be connected successfully once connected, you should see a few sample methods for the provider select any of the sample methods, click on send and run an api call the response section will show the response received from the provider your test is now complete and you are ready to add the connect button to your app for your users to click to connect their accounts add oauth connect button add the connect button to your page to allow your users to connect and authorize your app (e g add to slack, connect to google etc ) click on setup and select oauth connect buttons to get your code you will need to add 2 pieces of script to your page to enable the connection add the following script to the \<head> section of your app \<script src="https //labs pathfix com/helper js" id="pinc helper" modules="popups,modals,oauth" data public key="5ee0dc9a fae0 4wce be6b 4da236a6e4f39" data user id="\[marketsaas end user id]"> \</script> replacements change ( marketsaas end user id ) with the user id associated with your app this is generally the email address or unique username or any unique id associated with your user in your app database add the following script to the button (body) on your app to add the functionality \<button data oauth command="slack call" >integrate with slack\</button> replacements you can change the display text as per your requirements your authorization connection to the service provider is now active this will add the functionality that will allow the users to click to connect to their account for the service provider pathfix will handle the connection, manage the access and refresh tokens for each user against each provider integration next step is to send api requests (payload) between your app and the service provider, read our documentation on how you can enable pass through api docid\ jidaxepnr2owz8w4 jpbk need help? reach out to us at support\@pathfix com and we would be happy to assist!