Skip to main content
PUT
Set connector scopes

Authorizations

Authorization
string
header
required

Personal access token, sent as Authorization: Bearer <token>.

Path Parameters

integration_type
required

ID of the connector, from integration_type in List connectors.

Available options:
googlecalendar,
google_classroom,
googledrive,
gmail,
googlesheets,
googledocs,
googleslides,
googlebigquery,
googlemeet,
googletasks,
googleads,
google_analytics,
google_search_console,
slack,
notion,
salesforce,
hubspot,
linkedin,
tiktok,
instagram,
discord,
slackbot,
wix,
github,
gitlab,
bamboohr,
dropbox,
clickup,
wrike,
box,
outlook,
linear,
airtable,
microsoft_teams,
share_point,
one_drive,
typeform,
splitwise,
hugging_face,
calendly,
contentful,
supabase,
snowflake,
databricks,
quickbooks,
square
app_id
string
required

ID of the app.

Body

application/json

The scopes, and any connection values, the app's connection should have.

scopes
string[]
required

Every OAuth scope the connection should have. Scopes the app's current connection has and this list leaves out are dropped. Send an empty list for the connector's default scopes.

Example:
connection_config
Connection Config · object | null

Values the connector needs before authorization, keyed by the name of each field from Get connector connection fields. Leave it out for connectors that have no fields. Values that differ from the saved ones start a new authorization.

Example:

Response

The authorization was started, or the response says why none was needed.

The authorization that sets the app's connection to the requested scopes, or why none was needed.

redirect_url
string | null
required

Link to open in a browser so the user can sign in to the provider and approve the scopes. It expires after 10 minutes. Treat it as a credential. The value is null when no authorization was started.

Example:

"https://app.base44.com/api/external-auth/connect/3f9c2a7e5b8d4c1fa6e0d2b7c9a1e4f3"

connection_id
string | null
required

ID of the connection being authorized. Pass it to Get connector connection status. When already_authorized is true it's the existing connection. The value is null when error is set.

Example:

"base44_6820f3a4e7b91d003c45a1f7"

already_authorized
boolean
default:false

Whether you already have an active connection with exactly these scopes and connection values (true), so there's nothing to open, or not (false).

Example:

false

error
string | null

Why no authorization was started, or null if one was. Either different_user, when another collaborator's active connection already has exactly these scopes, or service_unavailable, when the provider can't be reached. Retry later.

Example:

"different_user"

error_message
string | null

Readable explanation of error. It can be null even when error is set, so branch on error.

Example:

"Integration googlecalendar is already authorized by a different user for this app."