Web SDK Reference
Below are the public functions exposed on the Kolla Web SDK, Kolla.js. They are accessible at `window.kolla`.
.authenticate(consumerToken: string)
This is required before using the other SDK functions and API requests. For details on getting the consumer token, see Installing Konnect.
.openMarketplace()
This will launch the Integration Marketplace in a modal on your website.
.closeMarketplace()
This will close the Integration Marketplace modal on your website.
.openConnector(connectorID: string)
This will launch the integration marketplace directly to a connector details page instead of starting at the marketplace list page.
.authConnector(connectorID: string, redirectURL:string[optional])
This will trigger the authentication process for the given connector immediately without showing the embedded marketplace. This is for OAuth connectors only.
If you pass the optional redirectURL, after authentication is finished it will redirect to that URL. If this isn't set it will redirect to the URL that it was on when the function was called.
.subscribe(eventName: string, handler: Function)
Use this function to subscribe to events. These events are scoped only to the current session for the current user/consumer.
Event Type | Usage .subscribe("[event_title]", fn) |
---|---|
Link Created | "onLinkCreated" |
Link Disabled | "onLinkDisabled" |
Marketplace Opened | "onMarketplaceOpened" |
Marketplace Closed | "onMarketplaceClosed" |
.getConsumer()
This gets the consumer information from the consumer token and also returns all the linked accounts for the authenticated consumer.
.getConnectors()
Get a list of all your connectors with logos and background color. Use this endpoint to create your own connector list page.
Last updated