Get the details to show on the consent screen
const url = 'https://api.adversarial.com/api/v1/oauth/consent-info';const options = {method: 'GET', headers: {cookie: 'arm-session=<arm-session>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.adversarial.com/api/v1/oauth/consent-info \ --cookie arm-session=<arm-session>Returns the name of the client requesting access, the organizations the grant can be bound to, and the scopes that can be granted in each, so the consent screen can describe both what is being granted and where. Requires a pending authorization request in the current session.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Consent screen metadata
Everything needed to render a consent screen: who is asking for access and what they are asking for.
object
Organizations this grant may bind to, in resume order (last-used first). Never empty — an empty set is an error, not a response.
One selectable organization on the consent screen, with the scopes this user can actually grant inside it.
object
True for the organization the browser session currently points at. Has no effect on the grant.
Requested scopes this user can grant in this organization. May be empty — a member with no matching permissions still sees their org listed rather than silently missing.
object
Human-readable description of what this scope grants, suitable for showing to the person approving it.
Machine-readable scope label, e.g. “risks:read”.
Everything the client asked for, before any per-organization
intersection. Empty when the client omitted scope entirely.
The organization pre-selected on the screen: the session org when it is
grantable, otherwise the first entry of organizations.
Examplegenerated
{ "client_id": "example", "client_name": "example", "is_dynamic": true, "organizations": [ { "display_name": "example", "icon": "example", "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "is_session_org": true, "scopes": [ { "description": "example", "scope": "example" } ], "slug": "example" } ], "redirect_uri": "example", "requested_scopes": [ "example" ], "resource": "example", "selected_org_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}No pending authorize request
Not authenticated
No organization this client may be authorized for
Referenced client no longer exists