Completes OAuth consent (approve or deny)
curl --request POST \
--url http://localhost:8001/api/oauth/authorize \
--header 'Content-Type: application/json; charset=utf-8' \
--data '
{
"client_id": "<string>",
"redirect_uri": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"state": "<string>",
"approved": true,
"csrf_token": "<string>",
"scope": "<string>",
"resource": "<string>",
"workspace_ids": "<string>"
}
'import requests
url = "http://localhost:8001/api/oauth/authorize"
payload = {
"client_id": "<string>",
"redirect_uri": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"state": "<string>",
"approved": True,
"csrf_token": "<string>",
"scope": "<string>",
"resource": "<string>",
"workspace_ids": "<string>"
}
headers = {"Content-Type": "application/json; charset=utf-8"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json; charset=utf-8'},
body: JSON.stringify({
client_id: '<string>',
redirect_uri: '<string>',
code_challenge: '<string>',
code_challenge_method: '<string>',
state: '<string>',
approved: true,
csrf_token: '<string>',
scope: '<string>',
resource: '<string>',
workspace_ids: '<string>'
})
};
fetch('http://localhost:8001/api/oauth/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8001",
CURLOPT_URL => "http://localhost:8001/api/oauth/authorize",
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([
'client_id' => '<string>',
'redirect_uri' => '<string>',
'code_challenge' => '<string>',
'code_challenge_method' => '<string>',
'state' => '<string>',
'approved' => true,
'csrf_token' => '<string>',
'scope' => '<string>',
'resource' => '<string>',
'workspace_ids' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; charset=utf-8"
],
]);
$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 := "http://localhost:8001/api/oauth/authorize"
payload := strings.NewReader("{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json; charset=utf-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8001/api/oauth/authorize")
.header("Content-Type", "application/json; charset=utf-8")
.body("{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8001/api/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json; charset=utf-8'
request.body = "{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}OAuth
Completes OAuth consent (approve or deny)
Completes OAuth consent (approve or deny). Browser session cookie and CSRF required; bearer tokens cannot call this endpoint.
POST
/
oauth
/
authorize
Completes OAuth consent (approve or deny)
curl --request POST \
--url http://localhost:8001/api/oauth/authorize \
--header 'Content-Type: application/json; charset=utf-8' \
--data '
{
"client_id": "<string>",
"redirect_uri": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"state": "<string>",
"approved": true,
"csrf_token": "<string>",
"scope": "<string>",
"resource": "<string>",
"workspace_ids": "<string>"
}
'import requests
url = "http://localhost:8001/api/oauth/authorize"
payload = {
"client_id": "<string>",
"redirect_uri": "<string>",
"code_challenge": "<string>",
"code_challenge_method": "<string>",
"state": "<string>",
"approved": True,
"csrf_token": "<string>",
"scope": "<string>",
"resource": "<string>",
"workspace_ids": "<string>"
}
headers = {"Content-Type": "application/json; charset=utf-8"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json; charset=utf-8'},
body: JSON.stringify({
client_id: '<string>',
redirect_uri: '<string>',
code_challenge: '<string>',
code_challenge_method: '<string>',
state: '<string>',
approved: true,
csrf_token: '<string>',
scope: '<string>',
resource: '<string>',
workspace_ids: '<string>'
})
};
fetch('http://localhost:8001/api/oauth/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8001",
CURLOPT_URL => "http://localhost:8001/api/oauth/authorize",
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([
'client_id' => '<string>',
'redirect_uri' => '<string>',
'code_challenge' => '<string>',
'code_challenge_method' => '<string>',
'state' => '<string>',
'approved' => true,
'csrf_token' => '<string>',
'scope' => '<string>',
'resource' => '<string>',
'workspace_ids' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json; charset=utf-8"
],
]);
$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 := "http://localhost:8001/api/oauth/authorize"
payload := strings.NewReader("{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json; charset=utf-8")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8001/api/oauth/authorize")
.header("Content-Type", "application/json; charset=utf-8")
.body("{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8001/api/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json; charset=utf-8'
request.body = "{\n \"client_id\": \"<string>\",\n \"redirect_uri\": \"<string>\",\n \"code_challenge\": \"<string>\",\n \"code_challenge_method\": \"<string>\",\n \"state\": \"<string>\",\n \"approved\": true,\n \"csrf_token\": \"<string>\",\n \"scope\": \"<string>\",\n \"resource\": \"<string>\",\n \"workspace_ids\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}{
"success": true,
"message": "<string>"
}Body
application/json; charset=utf-8
Space-separated braid-desktop REST scopes. Allowed values:
transcripts:read, transcripts:write, meetings:read, meetings:write,
workspaces:read, workspaces:write, context:write. Omitted on consent
defaults to the full braid-desktop grant set. Only client_id=braid-desktop
may request these; MCP clients use tool-name scopes instead.