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

# Get UserInfo

> OIDC UserInfo. Returns the authenticated subject (user DID) and granted scopes for the bearer token. Use this to verify a CIBA approval token and identify which user approved the action.



## OpenAPI

````yaml get /userinfo
openapi: 3.1.0
info:
  title: BKey API
  description: Biometric approval infrastructure for AI agents — OAuth 2.1 + CIBA
  version: 1.0.0
  contact:
    name: BKey
    url: https://bkey.id
    email: dev@bkey.id
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.bkey.id
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
    description: OAuth 2.1 token, device auth, CIBA, revocation
  - name: Checkout
    description: Agent-initiated checkout with biometric approval
  - name: Vault
    description: Encrypted secret storage with biometric access
  - name: Payments
    description: Payment methods and shared payment tokens
  - name: Identity
    description: DID and identity management
paths:
  /userinfo:
    get:
      tags:
        - OAuth
      summary: Get UserInfo
      description: >-
        OIDC UserInfo. Returns the authenticated subject (user DID) and granted
        scopes for the bearer token. Use this to verify a CIBA approval token
        and identify which user approved the action.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  sub:
                    type: string
                    description: Subject identifier — user DID or client ID
                  scope:
                    type: string
                    description: Space-separated granted scopes
                  client_id:
                    type: string
                    description: OAuth client ID (for client_credentials tokens)
                required:
                  - sub
                  - scope
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Error code (e.g., invalid_grant, unauthorized_client)
                  error_description:
                    type: string
                  error_uri:
                    type: string
                    format: uri
                required:
                  - error
                additionalProperties: false
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: EdDSA-signed JWT obtained via OAuth 2.1 client_credentials or CIBA

````