Documentation Index
Fetch the complete documentation index at: https://docs.base44.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Connectors module for managing OAuth tokens for external services. Unlike the integrations module that provides pre-built functions, connectors give you raw OAuth tokens so you can call external service APIs directly. Use this when you need custom API interactions that the pre-built integrations do not cover. There are two connector types, depending on whether the token is shared across the app or specific to each user:- Shared connectors: A single OAuth token shared by all app users. Best for shared service accounts.
- App user connectors: Each app user has their own OAuth token. Best for actions that need to happen as the individual user.
Shared connectors
All app users share a single OAuth token. Use this for shared accounts. For example, posting to a company Slack channel or reading from a shared Google Calendar. To use a shared connector:- Connect the external service account in the app’s Integration settings or using the
connectors pushCLI command. - In a backend function, call
getConnection()using the service role client (base44.asServiceRole.connectors) with an integration type string to retrieve the shared OAuth token. - Use the returned
accessTokento call the external service’s API directly. Some connectors also return aconnectionConfigwith additional values such as a subdomain for building the API URL.
App user connectors
Each signed-in app user has their own OAuth token. Use this when each user needs to act as themselves. For example, sending emails from their Gmail account or posting to their personal LinkedIn. To use an app user connector:- Register OAuth credentials for the service in Workspace Settings to get a connector ID. This requires workspace admin access.
- From the frontend, call connectAppUser() with the connector ID to get an authorization URL, then redirect the app user to that URL to complete the OAuth flow.
- In a backend function, call
getCurrentAppUserConnection()using the service role client (base44.asServiceRole.connectors) with the connector ID to retrieve the app user’s token. - Use the returned
accessTokento call the external service’s API directly. Some connectors also return aconnectionConfigwith additional values such as a subdomain for building the API URL.
Available connectors
All connectors listed below support both shared and app user connections. For shared connectors, pass the integration type string togetConnection(). For app user connectors, register the connector in Workspace Settings and use the connector ID with getCurrentAppUserConnection().
| Service | Type identifier |
|---|---|
| Airtable | airtable |
| BambooHR | bamboohr |
| Box | box |
| Calendly | calendly |
| ClickUp | clickup |
| Contentful | contentful |
| Discord | discord |
| Dropbox | dropbox |
| GitHub | github |
| GitLab | gitlab |
| Gmail | gmail |
| Google Analytics | google_analytics |
| Google BigQuery | googlebigquery |
| Google Calendar | googlecalendar |
| Google Classroom | google_classroom |
| Google Docs | googledocs |
| Google Drive | googledrive |
| Google Meet | googlemeet |
| Google Search Console | google_search_console |
| Google Sheets | googlesheets |
| Google Slides | googleslides |
| Google Tasks | googletasks |
| HubSpot | hubspot |
| Hugging Face | hugging_face |
| Instagram Business | instagram |
| Linear | linear |
linkedin | |
| Microsoft Teams | microsoft_teams |
| Microsoft OneDrive | one_drive |
| Notion | notion |
| Outlook | outlook |
| Salesforce | salesforce |
| SharePoint | share_point |
| Slack User | slack |
| Slack Bot | slackbot |
| Splitwise | splitwise |
| Supabase | supabase |
| TikTok | tiktok |
| Typeform | typeform |
| Wix | wix |
| Wrike | wrike |
- Scopes and permissions: Gmail, LinkedIn, Slack, GitHub
- Slack connector types: About the Slack connectors explains the difference between
slackandslackbot
Dynamic Types
If you’re working in a TypeScript project, you can generate types from your app’s connector configurations to get autocomplete on integration type names when calling getConnection. See the Dynamic Types guide to get started.Methods
⚠️ getAccessToken()
Deprecated: Use getConnection instead.
getAccessToken(Retrieves an OAuth access token for a specific external integration type.integrationType):Promise<string>
Parameters
The type of integration, such as
'googlecalendar', 'slack', 'slackbot', 'github', or 'discord'. See Available connectors for the full list.Returns
Promise<string>
Promise resolving to the access token string.
Examples
getConnection()
getConnection(Retrieves the shared OAuth access token and connection configuration for a shared connector to a specific external integration type. Use this when a single shared account is connected and all app users access the same token. For per-user tokens, useintegrationType):Promise<ConnectorConnectionResponse>
getCurrentAppUserConnection() instead.
Some connectors require connection-specific parameters to build API calls.
In such cases, the returned connectionConfig is an object with the additional parameters. If there are no extra parameters needed for the connection, the connectionConfig is null.
For example, a service might need a subdomain to construct the API URL in
the form of {subdomain}.example.com. In such a case the subdomain will be available as a property of the connectionConfig object.
Parameters
The type of integration, such as
'googlecalendar', 'slack', 'slackbot', 'github', or 'discord'. See Available connectors for the full list.Returns
ConnectorConnectionResponse
Connection details.
Properties
Properties
Examples
getCurrentAppUserConnection()
getCurrentAppUserConnection(Retrieves the OAuth access token and connection configuration for an app user connector. The token returned is specific to the app user making the current request. For this to work, the SDK client must know which app user to act on behalf of. UseconnectorId):Promise<AppUserConnectorConnectionResponse>
createClientFromRequest() in a Base44 backend function to create such a client. It reads the app user’s JWT from the incoming request and attaches it automatically so the runtime can resolve the correct user’s connection.
The connector must be registered in Workspace Settings with OAuth credentials before this method can return a connection. The app user must also have completed the OAuth flow using connectAppUser().
Parameters
The ID of the app user connector configured in your workspace. This is not the integration type string. You can find it on the connector’s settings page in Workspace Settings.
Returns
AppUserConnectorConnectionResponse
Connection details for an app user connector.
Properties
Properties
Examples
connectAppUser()
connectAppUser(Initiates the OAuth flow for an app user connector. Returns a redirect URL that the app user should be navigated to in order to authenticate with the external service. The scopes and integration type are derived from the connector configuration in the backend.connectorId):Promise<string>
Parameters
The ID of the app user connector configured in your workspace. The AI builder inserts this ID into generated code when it sets up the connector flow. You can also retrieve it from the workspace connectors API.
Returns
Promise<string>
Promise resolving to the redirect URL string.
Example
disconnectAppUser()
disconnectAppUser(Disconnects an app user’s OAuth connection for an app user connector. Removes the stored OAuth credentials for the currently authenticated app user’s connection to the specified connector.connectorId):Promise<void>
Parameters
The ID of the app user connector configured in your workspace. The AI builder inserts this ID into generated code when it sets up the connector flow. You can also retrieve it from the workspace connectors API.
Returns
Promise<void>
Promise resolving when the connection has been removed.
Example
Type Definitions
ConnectorIntegrationType
ConnectorIntegrationType = keyofUnion of all connector integration type names from theConnectorIntegrationTypeRegistryextendsnever?string: keyofConnectorIntegrationTypeRegistry
ConnectorIntegrationTypeRegistry. Defaults to string when no types have been generated.
Example
ConnectorIntegrationTypeRegistry
Registry of connector integration type names. The
types generate command fills this registry, then ConnectorIntegrationType resolves to a union of the keys.
