Request cURL
curl -s -X PUT "https://app.upfour.io/v1/organization/sso/google" \
-H "Authorization: Bearer $UP4_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_id": "1234567890-acme.apps.googleusercontent.com",
"client_secret": "••••",
"enabled": false
}'
JavaScript
const res = await fetch("https://app.upfour.io/v1/organization/sso/google", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.UP4_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
client_id: "1234567890-acme.apps.googleusercontent.com",
client_secret: "••••",
enabled: false,
}),
});
console.log(res.status, await res.json());
Python
import os
import requests
res = requests.put(
"https://app.upfour.io/v1/organization/sso/google",
headers={"Authorization": f"Bearer {os.environ['UP4_API_KEY']}"},
json={
"client_id": "1234567890-acme.apps.googleusercontent.com",
"client_secret": "••••",
"enabled": False,
},
)
print(res.status_code, res.json())
Go
package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
payload := strings.NewReader(`{
"client_id": "1234567890-acme.apps.googleusercontent.com",
"client_secret": "••••",
"enabled": false
}`)
req, _ := http.NewRequest("PUT", "https://app.upfour.io/v1/organization/sso/google", payload)
req.Header.Set("Authorization", "Bearer "+os.Getenv("UP4_API_KEY"))
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
out, _ := io.ReadAll(res.Body)
fmt.Println(res.StatusCode, string(out))
}
PHP
<?php
$payload = <<<'JSON'
{
"client_id": "1234567890-acme.apps.googleusercontent.com",
"client_secret": "••••",
"enabled": false
}
JSON;
$ch = curl_init("https://app.upfour.io/v1/organization/sso/google");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer " . getenv("UP4_API_KEY"),
"Content-Type: application/json",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), " ", $response, "\n";
curl_close($ch);
Response
200
{
"data": {
"client_id": "1234567890-acme.apps.googleusercontent.com",
"created_at": "2026-10-27T09:00:00Z",
"enabled": false,
"id": "00000000-0000-4000-8000-000000000001",
"organization_id": "00000000-0000-4000-8000-000000000002",
"provider": "google",
"updated_at": "2026-10-27T09:00:00Z"
}
}
400
{
"error": {
"code": "bad_request",
"message": "The request is malformed or fails validation.",
"request_id": "req_…"
}
}
403
{
"error": {
"code": "permission_denied",
"message": "The credentials do not permit this action.",
"request_id": "req_…"
}
}