Skip to content
Weavz
Menu

Setting Up Connections

Connect third-party services to Weavz using OAuth2, API keys, or custom authentication.

Connections store the authentication credentials needed to interact with third-party services. Weavz supports OAuth2, API key, and custom authentication methods.

Connecting apps for your own AI client? Start with Connect Apps to Your AI. This guide covers For your product and embedding connections in your product.

For the main dashboard flow, open Apps, choose an app and create an Auth configuration. Then open Users, add your customer's user ID and choose Manage → Create connection link for the intended app configuration. Send that temporary link only to the intended customer. Configurations define app access; connections hold each customer's credentials. Project Members are your teammates and connect their own accounts in For your AI.

The advanced dashboard procedures below use Advanced → Connection records to manage individual records. Existing links may open this advanced flow with a particular workspace and app already selected. Confirm that setup before continuing.

Connection Types

TypeUse CaseExample
OAUTH2OAuth2 authorization flowGoogle, Slack, GitHub
PLATFORM_OAUTH2Platform-managed OAuth2 (pre-configured)Slack, Notion, Airtable
SECRET_TEXTSingle API key or tokenOpenAI, Anthropic, SendGrid
BASIC_AUTHUsername and passwordSMTP, legacy APIs
CUSTOM_AUTHMulti-field authenticationCustom services

OAuth2 Connections

OAuth2 connections use the hosted connect flow — a Weavz-hosted page that handles the full authorization process. You create a connect token, open the connect page (as a popup or redirect), and the user completes authorization there. Once finished, you retrieve the session to get the resulting connection.

OAuth App Selection

OAuth2 integrations can use two OAuth app sources:

SourceAvailabilitySelection
Weavz-managed OAuth appDefault where Weavz has configured provider credentialsOmit oauthAppId, or set oauthAppMode to weavz_managed
Tenant-owned custom OAuth appTeam, Scale, and EnterpriseRegister it in Settings > OAuth Apps, then select oauthAppMode: "custom" and pass the app's real oauthAppId

The connection type does not decide whether the provider sees a Weavz-managed OAuth client or your own OAuth client. That choice comes from OAuth app selection during hosted connect or from the configured workspace integration selected with workspaceIntegrationId. If no Weavz-managed OAuth app exists for the integration and you do not select a valid custom app, creating the connect token returns NO_OAUTH_APP.

1

Navigate to Connections

Choose For your product, then open Advanced → Connection records.

2

New Connection

Click New Connection and select the configured workspace integration, or choose an integration from the catalog.

3

Authorize

Review the configured sign-in method and connection owner. A per-user app requires the intended end user. Click Connect to open the secure authorization window.

4

Approve Access

Approve access in the popup — it closes automatically and your connection appears in the list.

API Key Connections

For services that use API keys or tokens:

1

Navigate to Connections

Choose For your product, then open Advanced → Connection records.

2

New Connection

Click New Connection and select the configured app or integration (e.g., OpenAI). Review its sign-in method and owner, then click Connect.

3

Enter Credentials

Enter your API key in the secure connection window.

4

Save

Complete the credential form and return to the dashboard. Check the connection status. Display names and external IDs are optional advanced details in the dashboard.

Custom Auth Connections

For integrations requiring multiple fields:

1

Navigate to Connections

Choose For your product, then open Advanced → Connection records.

2

New Connection

Click New Connection and select the configured app or integration (e.g., Freshsales). Review its sign-in method and owner, then click Connect.

3

Fill in Fields

The secure connection window shows the required fields for the integration. Fill in all required values (e.g., base URL and API key).

4

Save

Complete the credential form and return to the dashboard. Check the connection status. Display names and external IDs are optional advanced details in the dashboard.

End User Connections

For multi-tenant applications, use end users to manage per-user connections. Register an end user, then generate a connect URL for them:

bash
curl -X POST https://platform.weavz.io/api/v1/end-users \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "externalId": "user_456",
    "displayName": "Alice Johnson"
  }'
 
curl -X POST https://platform.weavz.io/api/v1/end-users/END_USER_ID/connect-token \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "integrationName": "slack" }'

Connections created through the end user connect portal are automatically linked to the end user. When executing actions directly, pass endUserId and the workspace integration integrationAlias so Weavz can resolve the right configured integration and the right user's credential. integrationName alone is convenient only when one configured instance exists.

bash
curl -X POST https://platform.weavz.io/api/v1/actions/execute \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "slack",
    "actionName": "send_channel_message",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "integrationAlias": "customer_slack",
    "endUserId": "user_456",
    "input": { "channel": "C0123456789", "text": "Hello!" }
  }'

See Managing End Users for the full workflow.

Connection External IDs

Connection external IDs are your stable identifiers for individual credential sets. Use them when your backend needs to retrieve or execute against a specific connection, such as a project API key, shared customer bot, or tenant-level account.

For per-user credentials, use end users instead: store your user's ID in endUser.externalId and pass that value as endUserId during execution.

When resolving by connection external ID, always pass the same context you used when creating or using the connection. workspaceId is required for resolution, and mismatched scope is rejected.

bash
curl -X POST https://platform.weavz.io/api/v1/connections \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "SECRET_TEXT",
    "integrationName": "openai",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "externalId": "conn_project_alpha_openai",
    "displayName": "Project Alpha OpenAI Key",
    "secretText": "sk-..."
  }'
 
curl -X POST https://platform.weavz.io/api/v1/connections/resolve \
  -H "Authorization: Bearer wvz_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "integrationName": "openai",
    "workspaceId": "550e8400-e29b-41d4-a716-446655440000",
    "externalId": "conn_project_alpha_openai"
  }'

Token Refresh

OAuth2 tokens are automatically refreshed when needed — no manual intervention required.

Listing Connections

bash
curl https://platform.weavz.io/api/v1/connections \
  -H "Authorization: Bearer wvz_your_key"

Deleting Connections

bash
curl -X DELETE https://platform.weavz.io/api/v1/connections/CONNECTION_UUID \
  -H "Authorization: Bearer wvz_your_key"