Skip to main content
connectors initiate sets up or re-scopes one connector directly on an app through the API and starts its authorization flow, without touching any local files or an app’s sandbox. It only needs a target app, which you can set with --app-id, the BASE44_APP_ID environment variable, or a linked project. Use it when you don’t maintain connector definitions as local files in a project, for example on an app you built in the app editor, or from a script or AI agent that only knows the app’s ID. Use connectors push instead when you do maintain connector definitions as local files, the same way you would for entities or functions. connectors initiate also never removes a connector, where push runs a full sync that deletes any connector missing from your local files. The connector it creates persists on the app itself, not just for your current terminal session, until you re-scope or remove it.
The scopes you pass replace the connector’s existing scopes instead of merging with them, so pass the full set you want each time. Any scope you leave out is dropped, and you are asked to authorize the connector again. See connector permissions and scopes for the scopes each service supports.
If the connector is already authorized with the requested scopes, the command reports this and exits. If a different user already authorized it, the command fails with a different_user error naming their email address.

Usage

Flags

Authorization flow

Authorizing a connector means signing in to the third-party service at a URL the command provides, and granting the requested scopes. This step needs a human, since the CLI can’t complete it on your behalf. The command always prints this URL, but what happens next depends on how you run it:
  • Interactive terminal: The command asks whether to open the URL in your browser. After you authorize, it waits up to two minutes and reports the result. Press Esc to stop waiting and finish authorizing later.
  • Non-interactive terminal, or with --json: The command exits without opening a browser or waiting. Open the URL yourself to complete authorization.
Running connectors pull afterwards is optional, since connectors initiate never touches any files itself and the connector stays authorized on the app either way. Pull it only if you also maintain a local project for this app and use connectors push, because push deletes any connector missing from your local files.

Example

Set up a Google Calendar connector on a specific app, without a local project:
Request several scopes, separated by commas, for a connector that is already authorized with different scopes:

See also