POST /v1/oauth/authorize
curl --request POST \
--url https://api.example.com/v1/oauth/authorize \
--header 'Content-Type: application/json' \
--cookie gproxy_session= \
--data '{}'import requests
url = "https://api.example.com/v1/oauth/authorize"
payload = {}
headers = {
"cookie": "gproxy_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'gproxy_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.example.com/v1/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.example.com/v1/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([
]),
CURLOPT_COOKIE => "gproxy_session=",
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.example.com/v1/oauth/authorize"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "gproxy_session=")
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.example.com/v1/oauth/authorize")
.header("cookie", "gproxy_session=")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'gproxy_session='
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"location": "<string>",
"outcome": {
"outcome": "issued"
}
}{
"error": "<string>",
"error_description": "<string>"
}OAuth
POST /v1/oauth/authorize
POST
/
v1
/
oauth
/
authorize
POST /v1/oauth/authorize
curl --request POST \
--url https://api.example.com/v1/oauth/authorize \
--header 'Content-Type: application/json' \
--cookie gproxy_session= \
--data '{}'import requests
url = "https://api.example.com/v1/oauth/authorize"
payload = {}
headers = {
"cookie": "gproxy_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {cookie: 'gproxy_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.example.com/v1/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.example.com/v1/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([
]),
CURLOPT_COOKIE => "gproxy_session=",
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.example.com/v1/oauth/authorize"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("cookie", "gproxy_session=")
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.example.com/v1/oauth/authorize")
.header("cookie", "gproxy_session=")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/oauth/authorize")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["cookie"] = 'gproxy_session='
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"location": "<string>",
"outcome": {
"outcome": "issued"
}
}{
"error": "<string>",
"error_description": "<string>"
}授权
consoleSessionbeareranthropicKeygoogleKey
查询参数
The base64url SHA-256 of the client's verifier (RFC 7636 §4.2).
Must be S256.
Matched exactly against oauth_clients.redirect_uris.
Must be code. This issuer has no implicit and no hybrid flow.
Space-delimited, per RFC 6749 §3.3. Empty asks for no scope.
Opaque client value, echoed back untouched on both outcomes. It is the client's CSRF defence and this issuer never interprets it.
请求体
application/json
What the person at the consent screen chose.
Named ConsentDecision rather than Decision because
snapshot::Decision [blocked] is the permission
evaluator's verdict, and the two appear in the same files.
可用选项:
approve, deny