Skip to content

Allow an AI client into the workspace with the scopes you choose among those offered: a viewer's reads alone. Answers where to send the browser, with the code

POST
/v1/buyer/ai-clients/authorize
curl --request POST \
--url https://example.com/v1/buyer/ai-clients/authorize \
--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.

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"
}

OK

Media typeapplication/json
object
redirect
required
string

Example generated

{
"redirect": "example"
}

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"
}
}