OAuth
Register an OAuth client
Dynamic client registration (RFC 7591). An MCP client registers itself before its first authorization request, so nobody has to add it by hand. This endpoint requires no authentication. Every client registered here is public: it holds no secret and proves itself on each authorization with PKCE, so registering grants nothing on its own — the user’s consent is still required. Each redirect_uri must use https, or http on a loopback address, and must not contain a fragment. Registration is rate-limited to 10 requests per hour per IP address. Fields a client sends that are not listed here are ignored.
POST
/
oauth
/
register
Register an OAuth client
curl --request POST \
--url https://api.guild.ai/v1/oauth/register \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>",
"redirect_uris": [
"<string>"
],
"token_endpoint_auth_method": "none",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
]
}
'import requests
url = "https://api.guild.ai/v1/oauth/register"
payload = {
"client_name": "<string>",
"redirect_uris": ["<string>"],
"token_endpoint_auth_method": "none",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_name: '<string>',
redirect_uris: ['<string>'],
token_endpoint_auth_method: 'none',
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code']
})
};
fetch('https://api.guild.ai/v1/oauth/register', 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.guild.ai/v1/oauth/register",
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_name' => '<string>',
'redirect_uris' => [
'<string>'
],
'token_endpoint_auth_method' => 'none',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'response_types' => [
'code'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.guild.ai/v1/oauth/register"
payload := strings.NewReader("{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.guild.ai/v1/oauth/register")
.header("Content-Type", "application/json")
.body("{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/oauth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"client_id_issued_at": 123,
"client_name": "<string>",
"redirect_uris": [
"<string>"
],
"token_endpoint_auth_method": "<string>",
"grant_types": [
"<string>"
],
"response_types": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Body
application/json
The RFC 7591 fields this server honors; any others a client sends are ignored, as the RFC allows.
Required string length:
1 - 128Required array length:
1 - 5 elementsAvailable options:
none Available options:
authorization_code, refresh_token Available options:
code ⌘I
Register an OAuth client
curl --request POST \
--url https://api.guild.ai/v1/oauth/register \
--header 'Content-Type: application/json' \
--data '
{
"client_name": "<string>",
"redirect_uris": [
"<string>"
],
"token_endpoint_auth_method": "none",
"grant_types": [
"authorization_code",
"refresh_token"
],
"response_types": [
"code"
]
}
'import requests
url = "https://api.guild.ai/v1/oauth/register"
payload = {
"client_name": "<string>",
"redirect_uris": ["<string>"],
"token_endpoint_auth_method": "none",
"grant_types": ["authorization_code", "refresh_token"],
"response_types": ["code"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
client_name: '<string>',
redirect_uris: ['<string>'],
token_endpoint_auth_method: 'none',
grant_types: ['authorization_code', 'refresh_token'],
response_types: ['code']
})
};
fetch('https://api.guild.ai/v1/oauth/register', 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.guild.ai/v1/oauth/register",
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_name' => '<string>',
'redirect_uris' => [
'<string>'
],
'token_endpoint_auth_method' => 'none',
'grant_types' => [
'authorization_code',
'refresh_token'
],
'response_types' => [
'code'
]
]),
CURLOPT_HTTPHEADER => [
"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://api.guild.ai/v1/oauth/register"
payload := strings.NewReader("{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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://api.guild.ai/v1/oauth/register")
.header("Content-Type", "application/json")
.body("{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/oauth/register")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"client_name\": \"<string>\",\n \"redirect_uris\": [\n \"<string>\"\n ],\n \"token_endpoint_auth_method\": \"none\",\n \"grant_types\": [\n \"authorization_code\",\n \"refresh_token\"\n ],\n \"response_types\": [\n \"code\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"client_id": "<string>",
"client_id_issued_at": 123,
"client_name": "<string>",
"redirect_uris": [
"<string>"
],
"token_endpoint_auth_method": "<string>",
"grant_types": [
"<string>"
],
"response_types": [
"<string>"
]
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}