Skip to main content
You can open the prebuilt connection UI for a specific integration with:

This guide shows you how you can implement a custom connection UI

1. Get Auth Options

To get information about what to ask the user in order to create a connection, fetch connection options:

For simplicity, we’ll assume there is only one auth option. If there are more, you can use the same logic for each of them. If there are zero options, it means authentication is not configured and you need to edit or change the connector. Each connection option contains:
  • key – Unique identifier for this auth option (pass to authOptionKey when connecting)
  • type – The authentication type (e.g., ‘oauth2’, ‘client-credentials’)
  • title – Human-readable name for this auth option
  • description – Description explaining this auth method
  • inputSchemaData Schema of the parameters required to create a connection. It will be empty if parameters are not required.

2. Connection Parameters UI

You can use your preferred way of converting JSON Schema into a form. For example, you can extract a list of fields from the schema and simply display an input for each:

If a connection doesn’t have parameters, you can skip this step.

3. Creating a Connection

When you have collected connection input, you can create a connection:

This code may open a new window if it is required by the authentication process. Make sure this code runs inside a user action handler (e.g. onClick), otherwise the browser may block the new window.

Redirect instead of a new window When you need to avoid opening a new window, you can use redirect instead. Pass sameWindow: true and redirectUri options. The URI will be used for redirection after the connection is created or fails. Added query parameters:
  • For successful creation, the connectionId will be added
  • For failures, error will contain the error message and errorData will contain the JSON stringified error payload

4. Putting it all together

Here is a simple UI component that displays the connection parameters and creates a new connection:

5. Re-connecting

When a connection becomes disconnected, you can re-connect it using the same code as when creating a new connection:

Creating or updating connections

Every completed connect(...) flow creates a new connection when you target an integration (integrationId / integrationKey), connector (connectorId / connectorKey), or external app (externalAppId / externalAppKey). To re-authenticate or update an existing connection in place, pass its connectionId. That is the only path that writes fresh credentials to an existing connection record.