How do I disconnect a provider in a custom UI without using the Terra widget?

SoleGiraffe4 weeks 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:

  1. Disconnect: Call the deauthenticate endpoint with the specific user_id you want to disconnect
  2. Handle Response: The API will return confirmation of disconnection
  3. Event Handling: You'll receive a deauth event via your webhook when disconnection is successful

Alternative Widget Method

If you prefer using the widget with disconnect functionality:

  1. Add show_disconnect: true as a body parameter when generating a widget session
  2. Users will see a "disconnect" button next to their connected devices
  3. 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.

Cookie Preferences

Essential CookiesAlways On
Advertisement Cookies
Analytics Cookies

Crunch Time: Embrace the Cookie Monster Within!

We use cookies to enhance your browsing experience and analyse our traffic. By clicking “Accept All”, you consent to our use of cookies according to our Cookie Policy. You can change your mind any time by visiting out cookie policy.