Start OAuth authorization flow
Initiates the OAuth 2.1 authorization code flow and redirects to the Nomadfiling authorization UI with the incoming parameters forwarded.
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
RequiredRegistered OAuth client identifier.
query
redirect_uristring
RequiredRedirect URI registered for the client.
Format: uri
query
response_typestring
RequiredOAuth response type. Must be code.
Options: code
query
statestring
Opaque client state value returned on redirect.
query
code_challengestring
PKCE code challenge value.
query
code_challenge_methodstring
PKCE transformation method. Defaults to plain.
Options: S256, plain
query
scopestring
Requested OAuth scope. Defaults to mcp.
Request Preview
Response
Response will appear here after sending the request
Query Parameters
client_idstring
RequiredRegistered OAuth client identifier.
redirect_uristring
RequiredRedirect URI registered for the client.
statestring
Opaque client state value returned on redirect.
code_challengestring
PKCE code challenge value.
Responses
Was this page helpful?