Users API
Last updated
Was this helpful?
Last updated
Was this helpful?
The Users API allows you to query and modify the state of your Connected Users and their integrations.
The API includes REST endpoints (and matching SDK functions) for identifying what integrations your user has enabled, disconnecting integrations, and disabling workflows. The API also allows your application to associate metadata with a Connected User.
✨ User Metadata is included in the Pro Plan and above. to schedule a demo of User Metadata or upgrade your account.
The Users API can be used for integration usage analysis or maintenance of Connected Users. For example, using the API methods, you can...
Automatically disconnect integrations when a user deletes or downgrades their account in your application
Enrich your Connected Users' profile information with email, name, and other metadata
Check if a user has enabled a certain integration and view account connection status
Requests to the Users API are authorized with a Bearer-type Authorization
header using a Paragon User Token:
In the SDK, the Users API can be called directly after calling paragon.authenticate
:
You can associate your user with metadata by including it in your existing SDK call to paragon.authenticate
, as an additional parameter:
Alternatively, you can supply the metadata from your application after authenticating:
Metadata properties are available for use in workflows in the variable menu of the Workflow Editor. To select a metadata property in a workflow, you'll first need to set a sample metadata object.
A dialog will appear to set a sample metadata object that represents the object you will pass through to the API or SDK as shown above in Associate Connected User with metadata.
Any properties set in this sample object will be available for selection in the variable menu, in the "User Info" section:
You can access Connected User info (including any associated metadata) using paragon.getUser
or with the REST API.
credentialStatus
propertyIf a previously connected account is unreachable (e.g. your user revokes access from the integration), the Connect Portal will show a warning and prompt your user to reconnect their account:
You can check for this condition with the SDK with the credentialStatus
property. For example:
Integrations can be disconnected using paragon.uninstallIntegration
or with the REST API.
When an integration is disconnected, workflows for that integration will stop running for the authenticated user and any saved User Settings will be cleared.
Note: Name
and Email
are special parameters that you can view within the . They are also case-sensitive.
From any workflow, click the menu in the top navigation and select Set User Metadata:
If you are using the Headless Connect Portal, you should show a reconnection prompt when credentialStatus
is not "VALID"
. You can initiate a reconnection flow with the same function used to start a connection flow: .