Skip to main content

Creating a Connection with Weld

To allow users to connect their data sources through Weld, the first step is to create a Connection Bridge. This bridge acts as a link between your application's UI and Weld’s authentication flow.

Step 1: Create a Connection Bridge

Make a POST request to the following endpoint:

POST /openapi/connection_bridges

Request Body

You must include the following fields in the request body:

  • redirect_uri (string): The URL where Weld should redirect the user after the authentication flow is completed. This is typically a page in your application that will handle the response from Weld.
  • integration_id (string): The ID of the specific Weld integration you want to connect the user to (e.g., Hubspot, Google Ads, Salesforce, etc.).

Example

{
"redirect_uri": "https://your-app.com/connection/callback",
"integration_id": "the_integration_id"
}

Response

If the request is successful, the response will contain an authorize_url. This is a Weld-hosted URL where the user will complete the authentication or credential setup.

Example Response

{
"authorize_url": "https://connect.weld.app/authorize?token=abc123",
"expires_at": "2025-05-03T10:41:07.000Z"
}

Step 2: Redirect the User

You should redirect the user to the authorize_url received in the response. This URL leads to a secure Weld page where the user can authenticate with the selected integration.

Depending on the integration, this page may:

  • Trigger an OAuth 2.0 authentication flow (e.g., for platforms like Google or Facebook),
  • Or prompt the user to manually fill out required credentials (e.g., API keys, other credentials).

Step 3: User Authentication and Redirect

Once the user completes the required steps, Weld will redirect them back to the redirect_uri you initially provided along with the newly created connection_id as a query parameter.

You can now use this connection_id to create an ELT sync and begin syncing your data with Weld.