curl --request PUT \
--url https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection"
payload = { "enabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: false})
};
fetch('https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection', 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}/connector-governance/{integration_type}/per-user-connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false
]),
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}/connector-governance/{integration_type}/per-user-connection"
payload := strings.NewReader("{\n \"enabled\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"integration_type": "googlecalendar",
"display_name": "Google Calendar",
"connector_mode": "all",
"builder_connection_enabled": true,
"per_user_connection_enabled": false,
"has_per_user_credentials": false,
"not_yet_enabled": false
}Update per-user connection policy
Turns per-user connections for a connector on or off in a workspace.
A connector policy has two switches. builder_connection_enabled decides whether builders can connect the connector to the workspace’s apps. per_user_connection_enabled decides whether the apps’ users can connect their own accounts through a workspace connector.
Turning it on needs a workspace connector for the connector, from Create workspace connector. Turning a switch off also stops apps from using connections already made that way, until it’s turned back on. Owners of affected apps get a notification.
Setting the current value again changes nothing. Changing this switch needs a plan that includes connector policies, except for connectors whose connector_mode is byo_shared_only or byo_shared_and_app_user.
This is limited to 60 requests per minute, shared by Update builder connection policy, Update per-user connection policy, and Update workspace connector policies in bulk. 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 PUT \
--url https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": false
}
'import requests
url = "https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection"
payload = { "enabled": False }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: false})
};
fetch('https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection', 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}/connector-governance/{integration_type}/per-user-connection",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => false
]),
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}/connector-governance/{integration_type}/per-user-connection"
payload := strings.NewReader("{\n \"enabled\": false\n}")
req, _ := http.NewRequest("PUT", 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.put("https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.base44.com/api/workspace/{workspace_id}/connector-governance/{integration_type}/per-user-connection")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false\n}"
response = http.request(request)
puts response.read_body{
"integration_type": "googlecalendar",
"display_name": "Google Calendar",
"connector_mode": "all",
"builder_connection_enabled": true,
"per_user_connection_enabled": false,
"has_per_user_credentials": false,
"not_yet_enabled": false
}Authorizations
Personal access token, sent as Authorization: Bearer <token>.
Body
The new value of the switch.
Whether to turn the switch on (true) or off (false).
false
Response
The connector's policy.
ID of the connector.
"googlecalendar"
Name of the connector.
"Google Calendar"
Which ways the connector can be connected. One of all, shared_only, app_user_only, byo_shared_only, or byo_shared_and_app_user, with the same meaning as connector_mode in List connectors.
"all"
Whether the workspace lets builders connect the connector to its apps (true) or has turned that off (false). When it's false, starting a connection is refused.
true
Whether the apps' users can connect their own accounts with the workspace's credentials (true) or not (false). Always false when has_per_user_credentials is false.
false
Whether the workspace has set up its own OAuth app credentials for the connector.
false
Whether both switches are off only because the connector became available after the workspace chose to start new connectors off, and nobody has set its policy yet (true). Setting either switch makes it false.
false
Was this page helpful?