Create workspace connector

Changed on

<Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Creates a workspace connector.

A workspace connector holds the workspace's own OAuth app for a connector, so the workspace's apps connect through it instead of through Base44's OAuth app. A connector can also run on Base44's OAuth app for the apps' users, when credential_source is base44.

With credential_source set to byo, send the client ID and secret of an OAuth app you registered in the provider's console, then register the redirect URIs from Get OAuth redirect URIs there too. With base44, send neither: the connector runs on Base44's OAuth app, which needs a plan that includes Base44-managed connectors and accepts only the scopes that app is approved for.

Names are unique in a workspace, so retrying a create that succeeded returns a 409.

This is limited to 30 requests per minute, shared by Create workspace connector, Update workspace connector, and Delete workspace connector. A signed-in session has its own limit, and every personal access token for the workspace shares one. Some workspaces have a different limit.

<Note>Call this as an owner or admin of the workspace, with a personal access token for that workspace sent as a Bearer token, or from a signed-in session. A read-only token is refused. Workspace API keys aren't accepted.</Note>

post/api/workspace/{workspace_id}/connectors

Request

  • Base URL: https://app.base44.com
  • URL: https://app.base44.com/api/workspace/{workspace_id}/connectors
  • Auth: HTTP bearer

Path parameters

workspace_idstring required

ID of the workspace. With a personal access token, use the token's workspace. Get it from organization_id in Get app.

Request body

namestring required

Name of the workspace connector. Must be unique in the workspace, matching case exactly.

credential_source'byo' | 'base44'

Whose OAuth app the connector runs on: byo for your own, registered in the provider's console, or base44 for Base44's. Defaults to byo. base44 needs a plan that includes Base44-managed connectors, and only some connectors offer it.

client_idstring

Client ID of your OAuth app, up to 512 characters. Required with byo. Leave it out with base44.

client_secretstring

Client secret of your OAuth app, up to 512 characters. Required with byo, except for connectors whose OAuth apps have no secret, such as Linear. Leave it out with base44. It's stored encrypted and never returned.

scopesstring[]

OAuth scopes connections through this connector ask for. With base44, only scopes Base44's OAuth app is approved for are accepted.

connection_configobject

Values the connector needs, keyed by the name of each of its connection fields. Leave it out for connectors that have none.

Example request

{
  "name": "Sales Google Calendar",
  "credential_source": "byo",
  "client_id": "1234567890-abc123def456.apps.googleusercontent.com",
  "client_secret": "your-oauth-client-secret",
  "scopes": [
    "https://www.googleapis.com/auth/calendar.readonly"
  ],
  "connection_config": {}
}

Response

The new workspace connector.

idstring required

ID of the workspace connector. Pass it as connector_id to Start connector connection.

organization_idstring required

ID of the workspace.

integration_typestring required

Connector it's for.

namestring required

Name of the workspace connector.

credential_source'byo' | 'base44'

Whose OAuth app it runs on: byo for the workspace's own, or base44 for Base44's.

client_idstring required

Client ID of the workspace's OAuth app. Empty for a connector on Base44's OAuth app.

scopesstring[] required

OAuth scopes connections through it ask for.

connection_configobject

Connection values saved on it, keyed by field name. Empty when the connector needs none.

uses_oauth_gatewayboolean

Whether new connections return to the single gateway redirect URI (true) or to the per-app ones (false). Get OAuth redirect URIs says which to register.

Example response

{
  "id": "6820f3a4e7b91d003c45a1f9",
  "organization_id": "67e0b12c4d8a3f005b21c9e4",
  "integration_type": "googlecalendar",
  "name": "Sales Google Calendar",
  "credential_source": "byo",
  "client_id": "1234567890-abc123def456.apps.googleusercontent.com",
  "scopes": [
    "https://www.googleapis.com/auth/calendar.readonly"
  ],
  "connection_config": {},
  "uses_oauth_gateway": true
}

Changes