Supported Products
| Product | Supported |
|---|---|
| Workflows | Yes |
| ActionKit | Yes (via X-Paragon-Credential header) |
| Managed Sync | Yes (via credentialId in request body) |
| Proxy API | Yes (via selectedCredentialId or X-Paragon-Credential) |
Getting Started
Connecting new accounts To get started with Multiple Account Authorizations, you can pass inallowMultipleCredentials to paragon.installIntegration:
paragon.getUser to retrieve this list:
paragon.subscribe to listen for change events to the Paragon user object, if your UI updates dynamically.
Managing existing accounts
You can allow your users to manage User Settings for a specific account using the Connect Portal by passing selectedCredentialId to paragon.connect:
selectedCredentialId to paragon.uninstallIntegration:
Usage
A subset of SDK functions can be passed an additional parameter for Multiple Account Authorizations, as outlined below. In general, to use Multiple Account Authorizations, you will need to:- Use
user.integrations.[integration].allCredentials(a field returned inparagon.getUser) to display multiple connected accounts in your Integrations UI. - Update references to
paragon.connect(orparagon.installIntegrationandparagon.uninstallIntegration) to use the SDK with Multiple Account Authorizations enabled. - Update references to
paragon.requestandparagon.workflow(and API equivalents) to make sure that a specific account is targeted for a given integration type.
Access Control
If you are using Multi-Account Authorization to enable multiple users within one organization to connect their individual credentials within one Connected User, use JWT Permissions to restrict each user’s access to only the accounts they have connected:JWT Permissions
Learn more about implementing JWT Permissions to control access to credentials.
Reference
.connect
With Multiple Account Authorizations, useparagon.connect to present the Connect Portal for an existing account for the intended integration. Use paragon.installIntegration to connect new accounts.
- The Connect Portal can show the settings and workflows enabled for one account at a time, set by the
selectedCredentialIdproperty. IfselectedCredentialIdis not defined, the Connect Portal will use the first account available. - When the Connect Portal appears, a user can enable or disable workflows, update User Settings, and disconnect the account that is selected.
paragon.connect.
Example:
JavaScript
.installIntegration
Theparagon.installIntegration function starts the connection process for a new account of an integration. With Multiple Account Authorizations, pass allowMultipleCredentials: true so the function does not throw an error if the user already has this integration installed. You can use the resulting Promise to get the newly created credential.
For full documentation of this method, see paragon.installIntegration.
Example:
.uninstallIntegration
Callparagon.uninstallIntegration to disconnect an integration for the authenticated user. With Multiple Account Authorizations, use selectedCredentialId (SDK) or the X-Paragon-Credential header (API) to select a specific account to disconnect.
For full documentation of this method, see paragon.uninstallIntegration.
Example:
.getUser
Callparagon.getUser to retrieve the currently authenticated user and their connected integration state.
With Multiple Account Authorizations, paragon.getUser additionally returns allCredentials, an array of connected accounts for a given integration.
For full documentation of this method, see paragon.getUser.
Example Response:
JavaScript
.workflow
Callparagon.workflow to trigger a Paragon workflow that sends a custom response back to your app. Note: The workflow must be enabled and use a Request-type trigger.
With Multiple Account Authorizations, use selectedCredentialId (SDK) or the X-Paragon-Credential header (API) to select a specific account for which to trigger a workflow. The Credential ID that is used will be recorded for viewing in the Monitoring Workflows page.
For full documentation of this method, see paragon.workflow.
Example:
.request
Callparagon.request to send an API request to a third-party integration on behalf of one of your users. With Multiple Account Authorizations, use selectedCredentialId (SDK) or the X-Paragon-Credential header (API) to select a specific account to use with the Proxy API or ActionKit.
For full documentation of this method, see paragon.request.
Example:
picker.init
You can use the Paragon SDK to allow your user to select files from a File Storage integration in your app. After constructing a new instance of the ExternalFilePicker, you can initialize a file picker with the required configurationinitConfig, including the selectedCredentialId for the user.
Required configuration varies per integration; see integration-specific documentation for specific details. This function loads required JS dependencies into the page, if they have not already been loaded. Other methods, like picker.open and picker.getInstance, cannot be called until the Promise returned by picker.init is resolved.
Example:
JavaScript