Skip to content

consent

POST
/v1/oauth/consent
curl --request POST \
--url https://api.adversarial.com/api/v1/oauth/consent \
--header 'Content-Type: application/json' \
--cookie arm-session=<arm-session> \
--data '{ "authorize": true, "granted_scopes": [ "example" ], "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'
Media typeapplication/json

A decision on a pending authorization request: approve it or deny it.

object
authorize
required
boolean
granted_scopes

Granted scopes — may be a subset of what was requested. If omitted, all pending scopes are granted. Unknown scopes are ignored; scopes not present in the pending request are rejected to prevent privilege escalation.

Array<string> | null
org_id

Organization the grant binds to. Must be one of the organizations returned by /consent-info; it is re-proved server-side regardless. Required to approve, ignored on deny.

string | null format: uuid
Examplegenerated
{
"authorize": true,
"granted_scopes": [
"example"
],
"org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
}

Consent recorded; redirect URL returned

Media typeapplication/json
object
org_id

Organization the minted code is bound to. None on deny.

string | null format: uuid
redirect
required

Absolute URL the browser should navigate to next. On approve this is the client’s redirect_uri with ?code=...&state=...; on deny it is the redirect_uri with ?error=access_denied&state=....

string
Examplegenerated
{
"org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"redirect": "example"
}

No pending request, missing org_id, or invalid scope

Not authenticated

Not an active member of the selected organization

Referenced client no longer exists