Getting Started: Authorize Users And Connect To Any API Endpoint

Pathfix gives you the power to enable integrations in just a few minutes. With Pathfix, you can authorize your users for any provider and access any API endpoint, in just a few minutes.

This tutorial covers how you can get started and enable integrations on your platform.

Prerequisites

You will need the following to achieve the steps outlined here:

  • Access/create your Pathfix account here
  • Provider app credentials (please check our individual provider documentation to see how you can create your app and get the credentials)

Background

Pathfix has been built to solve the time and resource consuming OAuth connectivity. Pathfix works as a pass-through API that authorizes your users and connects you to any providers API endpoints without you worrying about OAuth servers, frameworks or OAuth token. We maintain the connection and keep it live by managing the tokens and access to each of the provider.

Add Application

Login to your Pathfix account to continue.

  • Click on “Add Application”
  • Enter the name of your application
  • Hit Save

Configure Provider

Once you have added your application, its time to configure the provider you would like to connect to.

  • In the Application page, click on the provider you want to integrate with
  • Enter the ClientID and ClientSecret (provider credentials) received from the provider
  • You can add/remove scopes that you wish to receive authorization for
  • Hit Save

Your provider configuration on Pathfix is now completed.

Implementation

Once you have configured the provider, you will need to implement the integration code to your platform to activate user authorization and be able to access the providers API endpoints.

Code for OAuth

  • Click on Code for OAuth under the provider options
  • Copy the code and paste it to the head of your integration page
  • Copy the code and paste it in the location you want the CONNECT button to appear for your users to authorize.
  • On saving/refreshing, the button to connect would automatically appear with formatting in place.

Code for Pass-through API

To access the providers API endpoint, you will need to add the code for pass-through API. All calls made to the provider, will pass through Pathfix where your calls are stamped with the appropriate tokens and sent to the API requested.

  • Click on Code for API under the provider options
  • Copy the code and add it to your application
  • There are a few replacements that need to be made which are detailed here

Sample SEND Call to the API Endpoint:

{
“url”: “https://www.googleapis.com/gmail/v1/users/me/messages”,
“method”: “GET”,
“payload”: {}
}

Conclusion

Pathfix handles the entire authentication, authorization and communication between your app and the provider allowing you to integrate and access any API endpoint offered by the provider. Including the token management required for access and refresh tokens as well as stamping API calls from the point your users click the integration button on your app.

Login to your Pathfix account and get started.

Ready to Start Connecting?

thin