Skip to main content
This page is part of an AI coding agent skill and is written for agents, not humans. For the human-readable Base44 docs, see the developer documentation.

base44 connectors initiate

Initialize a connector on an app and start its OAuth flow. Unlike connectors push, this works projectless — it only needs an app id, not a local project directory.

Syntax

npx base44 connectors initiate --integration-type <type> [--scopes <scopes...>] [--app-id <id>]

Options

OptionDescriptionRequired
--integration-type <type>Integration type to initiate (e.g. googlecalendar, gmail, slack)Yes
--scopes <scopes...>OAuth scopes to request. Space- or comma-separatedNo
--app-id <id>App to initiate the connector on. Falls back to BASE44_APP_ID or a linked local projectNo

Authentication

Required: Yes. If not authenticated, you’ll be prompted to login first.

What It Does

  1. Starts (or re-scopes) the OAuth connection for the given integration type on the target app
  2. If already authorized with the requested scopes, reports that immediately
  3. Otherwise prints an authorization URL and, when interactive, opens it in a browser and polls until authorization completes
  4. Once authorized, run base44 connectors pull to fetch the connector’s config to local files

Output

$ npx base44 connectors initiate --app-id app_123 --integration-type googlecalendar --scopes https://www.googleapis.com/auth/calendar

Authorize googlecalendar here: https://auth.base44.io/oauth/...

 googlecalendar authorized. Run 'base44 connectors pull' to fetch its config.
When already authorized:
$ npx base44 connectors initiate --app-id app_123 --integration-type slack

 slack is already authorized. Run 'base44 connectors pull' to fetch its config.

Declarative Scopes

Scopes passed to initiate replace the connector’s existing scopes rather than merging with them — omitted scopes are dropped and the user is re-prompted to consent. Run connectors list-available (or connectors pull) first to see current scopes, then pass the full desired set (existing scopes you want to keep plus any new ones).

JSON Output

Pass the global --json flag for a machine-readable result. In this mode the CLI never opens a browser or polls — it just returns the redirectUrl for the caller to handle:
$ npx base44 connectors initiate --app-id app_123 --integration-type gmail --scopes scope.a,scope.b --json
{
  "integrationType": "gmail",
  "alreadyAuthorized": false,
  "redirectUrl": "https://auth.base44.io/oauth/...",
  "connectionId": "conn_123"
}

Error Handling

If a different user already authorized this connector:
Error: Could not initiate googlecalendar: different_user (already authorized by other.user@example.com)
If --integration-type is missing or invalid:
Error: A valid --integration-type is required (e.g. googlecalendar, gmail, slack).

Use Cases

  • Set up a connector on an app without a local project checkout (e.g. from an agent or CI)
  • Re-scope an existing connector’s OAuth permissions
  • Kick off authorization as a discrete step before connectors pull