How do I disconnect a provider in a custom UI without using the Terra widget?
AllSoleGiraffe8 months ago
You can disconnect users from providers in your custom UI using Terra's API or by enabling disconnect functionality in the widget.
API Method (Recommended for Custom UI)
Use the DELETE /auth/deauthenticateUser endpoint:
- Endpoint:
/auth/deauthenticateUser - Method: DELETE
- Required parameter:
user_id(as query parameter) - Purpose: Programmatically disconnect a user from their provider
Implementation Steps:
- Disconnect: Call the deauthenticate endpoint with the specific
user_idyou want to disconnect - Handle Response: The API will return confirmation of disconnection
- Event Handling: You'll receive a
deauthevent via your webhook when disconnection is successful
Alternative Widget Method
If you prefer using the widget with disconnect functionality:
- Add
show_disconnect: trueas a body parameter when generating a widget session - Users will see a "disconnect" button next to their connected devices
- This method links devices by
reference_id(ensure you pass that parameter)
The API method gives you full control for building custom UI experiences, while the widget method provides a ready-made solution with disconnect capabilities.
EntireGorilla6 months ago
Muligai thotam aivu kattrai
StaleWarbler5 months ago
Hii