OAuth-Autorisierungsflow starten
Startet den OAuth-2.1-Authorization-Code-Flow und leitet mit den weitergegebenen eingehenden Parametern zur Nomadfiling-Autorisierungsoberfläche weiter.
curl -X GET "https://api.example.com/mcp-server/authorize?client_id=example_string&redirect_uri=example_string&response_type=code&state=example_string&code_challenge=example_string&code_challenge_method=S256&scope=mcp" \
-H "Content-Type: application/json"
import requests
import json
url = "https://api.example.com/mcp-server/authorize?client_id=example_string&redirect_uri=example_string&response_type=code&state=example_string&code_challenge=example_string&code_challenge_method=S256&scope=mcp"
headers = {
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.example.com/mcp-server/authorize?client_id=example_string&redirect_uri=example_string&response_type=code&state=example_string&code_challenge=example_string&code_challenge_method=S256&scope=mcp", {
method: "GET",
headers: {
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.example.com/mcp-server/authorize?client_id=example_string&redirect_uri=example_string&response_type=code&state=example_string&code_challenge=example_string&code_challenge_method=S256&scope=mcp", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/mcp-server/authorize?client_id=example_string&redirect_uri=example_string&response_type=code&state=example_string&code_challenge=example_string&code_challenge_method=S256&scope=mcp')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
response = http.request(request)
puts response.body
{}
{
"error": "invalid_request",
"error_description": "Required authorization parameters are missing."
}
{
"error": "invalid_client",
"error_description": "The specified client_id is invalid."
}
{
"error": "invalid_redirect_uri",
"error_description": "The redirect_uri does not match the registered client."
}
GET
/authorize
GET
Base URLstring
Target server for requests. Edit to use your own host.
query
client_idstring
RequiredRegistrierte OAuth-Client-Kennung.
query
redirect_uristring
RequiredFür den Client registrierte Redirect-URI.
Format: uri
query
response_typestring
RequiredOAuth-Response-Typ. Muss code sein.
Options: code
query
statestring
Undurchsichtiger Client-State-Wert, der bei der Weiterleitung zurückgegeben wird.
query
code_challengestring
PKCE-Code-Challenge-Wert.
query
code_challenge_methodstring
PKCE-Transformationsmethode. Standard ist plain.
Options: S256, plain
query
scopestring
Angeforderter OAuth-Scope. Standard ist mcp.
Request Preview
Response
Response will appear here after sending the request
Query Parameters
client_idstring
RequiredRegistrierte OAuth-Client-Kennung.
redirect_uristring
RequiredFür den Client registrierte Redirect-URI.
statestring
Undurchsichtiger Client-State-Wert, der bei der Weiterleitung zurückgegeben wird.
code_challengestring
PKCE-Code-Challenge-Wert.
Responses
Was this page helpful?