consent
const url = 'https://api.adversarial.com/api/v1/oauth/consent';const options = { method: 'POST', headers: {cookie: 'arm-session=<arm-session>', 'Content-Type': 'application/json'}, body: '{"authorize":true,"granted_scopes":["example"],"org_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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://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" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”A decision on a pending authorization request: approve it or deny it.
object
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.
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.
Examplegenerated
{ "authorize": true, "granted_scopes": [ "example" ], "org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Consent recorded; redirect URL returned
object
Organization the minted code is bound to. None on deny.
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=....
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