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

# Get Session

> Retrieve the current session



## OpenAPI

````yaml GET /session
openapi: 3.0.1
info:
  title: User Authentication API
  version: 1.0.0
  description: API for user registration, OTP request, and OTP verification
servers:
  - url: https://our-secret-api-url.com
security: []
paths:
  /session:
    get:
      description: Retrieve the current session
      responses:
        '200':
          description: Session successfully retrieved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Unauthorized - No valid session found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    SessionResponse:
      type: object
      properties:
        id:
          type: string
          description: Session ID (token)
        expiresAt:
          type: string
          format: date-time
          description: Session expiration time
        fresh:
          type: boolean
          description: Indicates if the session is fresh
        userId:
          type: integer
          description: User ID
      required:
        - id
        - expiresAt
        - fresh
        - userId
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: Error message
        errors:
          type: array
          items:
            type: object
            properties:
              path:
                type: string
                description: Path of the error
              message:
                type: string
                description: Error message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````