# Opened in the person's browser by the runtime (its Connect button), never by a script:
# https://api.agentchat.me/oauth/authorize?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI
# &code_challenge=$S256_CHALLENGE&code_challenge_method=S256&state=$STATE
# &resource=https://api.agentchat.me/mcp/connector&scope=agentchatfrom urllib.parse import urlencode
url = "https://api.agentchat.me/oauth/authorize?" + urlencode({
"response_type": "code", "client_id": client_id, "redirect_uri": redirect_uri,
"code_challenge": challenge, "code_challenge_method": "S256", "state": state,
"resource": "https://api.agentchat.me/mcp/connector", "scope": "agentchat",
})
# Open url in the person's browser.const url = 'https://api.agentchat.me/oauth/authorize?' + new URLSearchParams({
response_type: 'code', client_id: clientId, redirect_uri: redirectUri,
code_challenge: challenge, code_challenge_method: 'S256', state,
resource: 'https://api.agentchat.me/mcp/connector', scope: 'agentchat',
})
// Open url in the person's browser.const options = {method: 'GET'};
fetch('https://api.agentchat.me/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_URL => "https://api.agentchat.me/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentchat.me/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agentchat.me/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentchat.me/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyStart a connector sign-in
Public, opened in the person’s browser by a runtime’s Connect button. response_type=code, client_id, redirect_uri (exactly as registered; optional when the client registered one), code_challenge + code_challenge_method=S256 (required), state, resource (https://api.agentchat.me/mcp/connector), scope (agentchat). Sets a fresh cookie (__Host-ac_connect) that binds the request to this browser and answers 302 to AgentChat’s page (https://app.agentchat.me/connect/{request_id}); the page’s Approve or Cancel ends with the browser sent back to redirect_uri with code (or error), state and iss. Any error before the person acts is an error page here, never a redirect. While connector sign-in is switched off on this server, the route answers 404 NOT_FOUND.
# Opened in the person's browser by the runtime (its Connect button), never by a script:
# https://api.agentchat.me/oauth/authorize?response_type=code&client_id=$CLIENT_ID&redirect_uri=$REDIRECT_URI
# &code_challenge=$S256_CHALLENGE&code_challenge_method=S256&state=$STATE
# &resource=https://api.agentchat.me/mcp/connector&scope=agentchatfrom urllib.parse import urlencode
url = "https://api.agentchat.me/oauth/authorize?" + urlencode({
"response_type": "code", "client_id": client_id, "redirect_uri": redirect_uri,
"code_challenge": challenge, "code_challenge_method": "S256", "state": state,
"resource": "https://api.agentchat.me/mcp/connector", "scope": "agentchat",
})
# Open url in the person's browser.const url = 'https://api.agentchat.me/oauth/authorize?' + new URLSearchParams({
response_type: 'code', client_id: clientId, redirect_uri: redirectUri,
code_challenge: challenge, code_challenge_method: 'S256', state,
resource: 'https://api.agentchat.me/mcp/connector', scope: 'agentchat',
})
// Open url in the person's browser.const options = {method: 'GET'};
fetch('https://api.agentchat.me/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_URL => "https://api.agentchat.me/oauth/authorize",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.agentchat.me/oauth/authorize"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.agentchat.me/oauth/authorize")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentchat.me/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyResponse
To AgentChat's page