> ## Documentation Index
> Fetch the complete documentation index at: https://docs.korve.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Device Authorization

> Inspect a pending device authorization by its user code before approving or denying it.



## OpenAPI

````yaml /openapi.json get /v1/agent-auth/device-authorizations/{userCode}
openapi: 3.1.0
info:
  title: Korve API
  version: 0.1.0
  description: >-
    Typed control plane for deploying applications and explicitly provisioning
    their managed infrastructure.
servers:
  - url: https://api.korve.dev
security: []
paths:
  /v1/agent-auth/device-authorizations/{userCode}:
    get:
      tags:
        - agentAuth
      summary: Get Device Authorization
      description: >-
        Inspect a pending device authorization by its user code before approving
        or denying it.
      operationId: agentAuth.getDeviceAuthorization
      parameters:
        - name: userCode
          in: path
          required: true
          schema:
            type: string
            pattern: ^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$
            maxLength: 9
            description: >-
              Human-entered pairing code in XXXX-XXXX form, from an unambiguous
              alphabet.
      responses:
        '200':
          description: Safe approval details; the device code is never returned.
          content:
            application/json:
              schema:
                type: object
                properties:
                  userCode:
                    type: string
                    pattern: ^[BCDFGHJKLMNPQRSTVWXZ]{4}-[BCDFGHJKLMNPQRSTVWXZ]{4}$
                    maxLength: 9
                    description: >-
                      Human-entered pairing code in XXXX-XXXX form, from an
                      unambiguous alphabet.
                  clientId:
                    type: string
                    enum:
                      - korve-cli
                      - korve-mcp
                  audience:
                    type: string
                    enum:
                      - cli
                      - mcp
                    description: >-
                      The first-party client surface that may present the
                      resulting token.
                  scopes:
                    type: array
                    minItems: 1
                    maxItems: 256
                    items:
                      type: string
                      pattern: ^[A-Za-z][A-Za-z0-9]*\.[A-Za-z][A-Za-z0-9]*$
                      maxLength: 128
                    description: Exact public API operation ids the grant may call.
                  requestedRole:
                    type: string
                    enum:
                      - member
                      - admin
                    description: >-
                      Maximum organization role the grant may exercise. Owner
                      grants do not exist.
                  expiresAt:
                    type: string
                    format: date-time
                required:
                  - userCode
                  - clientId
                  - audience
                  - scopes
                  - requestedRole
                  - expiresAt
        '404':
          description: Unknown, expired, approved, denied, or consumed device code.
      security:
        - session: []
components:
  securitySchemes:
    session:
      type: apiKey
      in: cookie
      name: korve.session_token

````