> ## Documentation Index
> Fetch the complete documentation index at: https://humanity-eaeda8f6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OAuth · Authorization context

Hydrate consent surfaces with rich metadata (app name, avatar, requested presets, policy requirements) before showing users an approval prompt. Call this with the `authorization_id` returned from `/oauth/authorize` to render a branded UX or to pre-warm a hosted consent screen.

Pair with [`GET /oauth/authorize/result`](./oauth-authorize-result) to poll for the final decision when embedding the consent UI.


## OpenAPI

````yaml api-reference/openapi.json get /oauth/authorize/context
openapi: 3.1.0
info:
  version: 0.1.0
  title: hp-public-dev-api-server
  description: NestJS CQRS + TDD base for Humanity Public Dev API
servers:
  - url: https://api.sandbox.humanity.org/v2
    description: Sandbox environment for development and testing
  - url: https://api.humanity.org/v2
    description: Production environment
security: []
tags: []
paths:
  /oauth/authorize/context:
    get:
      tags: []
      parameters:
        - name: authorization_id
          in: query
          schema:
            type: string
          required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthorizeContextResponse'
components:
  schemas:
    AuthorizeContextResponse:
      type: object
      properties:
        authorization_id:
          type: string
        client_id:
          type: string
        user_id:
          type: string
        app_scoped_user_id:
          type: string
        status:
          oneOf:
            - const: pending_admin
            - const: approved
            - const: denied
            - const: revoked
            - const: consumed
        redirect_uri:
          type: string
        state:
          type: string
        requested_scopes:
          type: array
          items:
            type: string
        granted_scopes:
          type: array
          items:
            type: string
        code:
          type: string
        code_expires_at:
          type: string
        nonce:
          type: string
        application:
          $ref: '#/components/schemas/AuthorizeApplicationDetail'
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/AuthorizeScopeDetail'
        metadata:
          $ref: '#/components/schemas/AuthorizeContextMetadata'
        policy:
          $ref: '#/components/schemas/AuthorizeContextPolicy'
      required:
        - authorization_id
        - client_id
        - user_id
        - app_scoped_user_id
        - status
        - redirect_uri
        - requested_scopes
        - application
        - scopes
        - metadata
        - policy
    AuthorizeApplicationDetail:
      type: object
      properties:
        client_id:
          type: string
        name:
          type: string
        organization_id:
          type: string
        status:
          oneOf:
            - const: active
            - const: revoked
        redirect_uris:
          type: array
          items:
            type: string
        created_by_user_id:
          type: string
        created_at:
          type: string
        updated_at:
          type: string
        revoked_at:
          type: string
      required:
        - client_id
        - name
        - organization_id
        - status
        - redirect_uris
    AuthorizeScopeDetail:
      type: object
      properties:
        id:
          type: string
        display_name:
          type: string
        description:
          type: string
        category:
          type: string
        implied_scopes:
          type: array
          items:
            type: string
        is_default:
          type: boolean
      required:
        - id
        - display_name
    AuthorizeContextMetadata:
      type: object
      properties:
        created_at:
          type: string
        updated_at:
          type: string
        approved_at:
          type: string
        revoked_at:
          type: string
        last_token_issued_at:
          type: string
      required: []
    AuthorizeContextPolicy:
      type: object
      properties:
        requires_palm_verification:
          type: boolean
        preset_cache_ttl_seconds:
          type: number
      required:
        - requires_palm_verification
        - preset_cache_ttl_seconds

````