curl --request POST \
--url https://app.base44.com/api/workspace/{workspace_id}/connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_type": "googlecalendar",
"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": {}
}
'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/connectors"
payload = {
"integration_type": "googlecalendar",
"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": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integration_type: 'googlecalendar',
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: {}
})
};
fetch('https://app.base44.com/api/workspace/{workspace_id}/connectors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/workspace/{workspace_id}/connectors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'integration_type' => 'googlecalendar',
'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' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/workspace/{workspace_id}/connectors"
payload := strings.NewReader("{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/workspace/{workspace_id}/connectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/connectors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "6820f3a4e7b91d003c45a1f9",
"organization_id": "67e0b12c4d8a3f005b21c9e4",
"integration_type": "googlecalendar",
"name": "Sales Google Calendar",
"client_id": "1234567890-abc123def456.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/calendar.readonly"
],
"credential_source": "byo",
"connection_config": {},
"uses_oauth_gateway": true
}Create workspace connector
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.
curl --request POST \
--url https://app.base44.com/api/workspace/{workspace_id}/connectors \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"integration_type": "googlecalendar",
"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": {}
}
'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/connectors"
payload = {
"integration_type": "googlecalendar",
"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": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
integration_type: 'googlecalendar',
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: {}
})
};
fetch('https://app.base44.com/api/workspace/{workspace_id}/connectors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.base44.com/api/workspace/{workspace_id}/connectors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'integration_type' => 'googlecalendar',
'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' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.base44.com/api/workspace/{workspace_id}/connectors"
payload := strings.NewReader("{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.base44.com/api/workspace/{workspace_id}/connectors")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/connectors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"integration_type\": \"googlecalendar\",\n \"name\": \"Sales Google Calendar\",\n \"credential_source\": \"byo\",\n \"client_id\": \"1234567890-abc123def456.apps.googleusercontent.com\",\n \"client_secret\": \"your-oauth-client-secret\",\n \"scopes\": [\n \"https://www.googleapis.com/auth/calendar.readonly\"\n ],\n \"connection_config\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "6820f3a4e7b91d003c45a1f9",
"organization_id": "67e0b12c4d8a3f005b21c9e4",
"integration_type": "googlecalendar",
"name": "Sales Google Calendar",
"client_id": "1234567890-abc123def456.apps.googleusercontent.com",
"scopes": [
"https://www.googleapis.com/auth/calendar.readonly"
],
"credential_source": "byo",
"connection_config": {},
"uses_oauth_gateway": true
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Path Parameters
Body
A workspace connector to create.
Connector to create it for, from integration_type in List connectors. Its connector_mode has to be one of all, app_user_only, byo_shared_only, or byo_shared_and_app_user.
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 "googlecalendar"
Name of the workspace connector. Must be unique in the workspace, matching case exactly.
1"Sales Google Calendar"
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.
byo, base44 "byo"
Client ID of your OAuth app, up to 512 characters. Required with byo. Leave it out with base44.
512"1234567890-abc123def456.apps.googleusercontent.com"
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.
512"your-oauth-client-secret"
OAuth scopes connections through this connector ask for. With base44, only scopes Base44's OAuth app is approved for are accepted.
[
"https://www.googleapis.com/auth/calendar.readonly"
]
Values the connector needs, keyed by the name of each of its connection fields. Leave it out for connectors that have none.
Show child attributes
Show child attributes
{}
Response
The new workspace connector.
A workspace connector. The client secret is never returned.
ID of the workspace connector. Pass it as connector_id to Start connector connection.
"6820f3a4e7b91d003c45a1f9"
ID of the workspace.
"67e0b12c4d8a3f005b21c9e4"
Connector it's for.
"googlecalendar"
Name of the workspace connector.
"Sales Google Calendar"
Client ID of the workspace's OAuth app. Empty for a connector on Base44's OAuth app.
"1234567890-abc123def456.apps.googleusercontent.com"
OAuth scopes connections through it ask for.
[
"https://www.googleapis.com/auth/calendar.readonly"
]
Whose OAuth app it runs on: byo for the workspace's own, or base44 for Base44's.
byo, base44 "byo"
Connection values saved on it, keyed by field name. Empty when the connector needs none.
Show child attributes
Show child attributes
{}
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.
true
Was this page helpful?