The consent page's request checked: the AI client's metadata document, read now, and its redirect URI; then what to show, or, for a request OAuth answers by returning to its client, where to send the browser
POST
/v1/buyer/ai-clients/authorize/check
const url = 'https://example.com/v1/buyer/ai-clients/authorize/check';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"client_id":"example","code_challenge":"example","code_challenge_method":"example","redirect_uri":"example","resource":"example","response_type":"example","scope":"example","scopes":["example"],"state":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/buyer/ai-clients/authorize/check \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "client_id": "example", "code_challenge": "example", "code_challenge_method": "example", "redirect_uri": "example", "resource": "example", "response_type": "example", "scope": "example", "scopes": [ "example" ], "state": "example" }'Who: a workspace’s buyer or viewer. Not for API keys.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
client_id
required
string
code_challenge
required
string
code_challenge_method
required
string
redirect_uri
required
string
resource
required
string
response_type
required
string
scope
required
string
scopes
Array<string>
state
required
string
Example generated
{ "client_id": "example", "code_challenge": "example", "code_challenge_method": "example", "redirect_uri": "example", "resource": "example", "response_type": "example", "scope": "example", "scopes": [ "example" ], "state": "example"}Responses
Section titled “Responses”OK
Media typeapplication/json
object
asked
required
Array<string>
client
required
object
host
required
string
id
required
string
name
required
string
redirect_host
required
string
deny
required
string
loopback
required
boolean
offered
required
Array<string>
redirect
required
string | null
Example generated
{ "asked": [ "example" ], "client": { "host": "example", "id": "example", "name": "example", "redirect_host": "example" }, "deny": "example", "loopback": true, "offered": [ "example" ], "redirect": "example"}default
Section titled “default”An error, as go-commons apperr maps it
Media typeapplication/json
object
error
required
object
code
required
string
fields
object
key
additional properties
string
message
required
string
Example generated
{ "error": { "code": "example", "fields": { "additionalProperty": "example" }, "message": "example" }}