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

# Get user details



## OpenAPI

````yaml /openapi/openapi.yaml get /v2/auth/userdetails
openapi: 3.0.3
info:
  title: Qanapi
  version: 3.0.0
  description: Secure API with enforced API Key headers. Supports V2 and V3 endpoints.
servers:
  - url: https://{subdomain}.qanapi.cloud/api
    description: The Qanapi API server
    variables:
      subdomain:
        default: ''
        description: Customer-specific subdomain.
security:
  - ApiKeyAuth: []
paths:
  /v2/auth/userdetails:
    get:
      tags:
        - Authentication and Token Lifecycle
      summary: Get user details
      responses:
        '200':
          description: User details
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                    example: 123
                  email:
                    type: string
                    format: email
                    example: fake.user@example.com
                  name:
                    type: string
                    example: Fake User
                  first_login:
                    type: integer
                    example: 0
                  email_verified_at:
                    type: string
                    format: date-time
                    nullable: true
                    example: null
                  gravatar_url:
                    type: string
                    format: uri
                    example: >-
                      https://www.gravatar.com/avatar/00000000000000000000000000000000
                  roles:
                    type: array
                    items:
                      type: string
                    example:
                      - admin
                      - user
                      - readonly
                      - audit
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
      security:
        - BearerAuth: []
components:
  responses:
    UnauthorizedError:
      description: Unauthorized - Invalid API Key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              $ref: '#/components/examples/unauthorized'
    ForbiddenError:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            forbidden:
              $ref: '#/components/examples/forbidden'
  schemas:
    Error:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          example: An error occurred.
  examples:
    unauthorized:
      value:
        message: Unauthenticated.
    forbidden:
      value:
        message: This action is unauthorized.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-qanapi-authorization
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````