website logo
⌘K
GETTING STARTED
Getting started with Pathfix
Introduction
OAuth Connect Page
Custom Redirect Domain
Monitoring Activity
Workspace
Extensions
Security
Notifications
Event Callback
Scopes
Provider reference
Access tokens
SDK's
BUBBLE.IO INTEGRATION
Bubble.io Documentation
ADALO INTEGRATION
Adalo Documentation
Adalo User Authorization
Adalo API Call
DEVELOPER CENTER
Developer center
Pathfix Consent Screen (preview)
Module dependencies
Step-by-Step
General
JavaScript
PROVIDER SETUP DOCS
Integration Setup Docs
Identity Auth
Integrating with Airtable
Integrating with Box
Integrating with Hubspot
Integrating with GitHub
Integrating with Google Tasks
Integrating with Instagram Graph API
Integrating with LinkedIn
Integrating with Pipedrive
Integrating with Quickbooks
Integrating with Stripe
Integrating with Stripe-Server
Integrating with Slack
Integrating with TikTok
Integrating with Typeform
Integrating with WooCommerce
Integrating with Xero
Integrating with Zoom
Docs powered by archbee 
8min

JavaScript

Learn how to build and manage your integrations using Pathfix client library. Get documentation, example code, tutorials, and more.

Common Concepts

The pathfix oauth library is loaded by including the helper.js in the following manner.

HTML
|



Although the oauth.js can be loaded from the same location it will not work independently. It needs a few dependencies that are loaded by the helper.js







Pathfix, OnLoad

When the Pathfix helper library is ready it calls back a global function on the page. This is the place you should be attaching handlers to monitor the loading of other libraries. See example below...



HTML
|







Event Handlers

Events to all Pathfix libraries are attached using a standard syntax.

JS
|

Arguments

library

required

Name of the library that you'd want to attach to. For oauth library use "$pinc.oauth" as a string.

eventName

required

Eventname to be sent across as string eg. "ready"

callback

required

Event handler reference.

forceInvoke

optional

If true, it forces your callback to be invoked if the event was fired before you attached your handler.

Example

JS
|

Method Calls

Most method calls in Pathfix need callback as the final argument. Method calls are made to the library using their object reference. Below is the list of libraries available.



$pinc

All global functions are accessible using this object.

$pinc.oauth

Pathfix Oauth library.

Updated 28 Jul 2022
Did this page help you?
Yes
No
UP NEXT
The Script tag
Docs powered by archbee 
TABLE OF CONTENTS
Common Concepts
Pathfix, OnLoad
Event Handlers
Arguments
Example
Method Calls