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

# Get current user

> Get the currently authenticated user. See [Registration & Authentication](https://docs.galtea.ai/registration).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json get /auth/user
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /auth/user:
    get:
      tags:
        - auth
      summary: Get current user
      description: >-
        Get the currently authenticated user. See [Registration &
        Authentication](https://docs.galtea.ai/registration).
      operationId: getCurrentUser
      responses:
        '200':
          description: User retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    User:
      type: object
      properties:
        id:
          type: string
          example: user_123
        email:
          type: string
          format: email
          example: user@example.com
        name:
          type: string
          nullable: true
          example: John Doe
        role:
          type: string
          nullable: true
          enum:
            - ADMIN
            - OWNER
            - MEMBER
          example: MEMBER
        organizationId:
          type: string
          example: org_123
        hasPassword:
          type: boolean
          description: Whether the user has a password set
        hasGoogleId:
          type: boolean
          description: Whether the user has a linked Google account
        hasGithubId:
          type: boolean
          description: Whether the user has a linked GitHub account
        hasGitlabId:
          type: boolean
          description: Whether the user has a linked GitLab account
        hasSamlId:
          type: boolean
          description: Whether the user has a linked SAML account
        hasApiKey:
          type: boolean
          description: Whether the user currently holds at least one API token
        analyticsConsent:
          type: boolean
          nullable: true
          example: null
        marketingConsent:
          type: boolean
          example: false
        mfaSource:
          type: string
          nullable: true
          enum:
            - EMAIL
          example: null
          description: >-
            Preferred MFA source; non-null enables MFA, null disables it.
            Currently only "EMAIL" is supported.
        firstSignInAt:
          type: string
          format: date-time
          nullable: true
        latestSignInAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        deletedAt:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - email
        - name
        - role
        - organizationId
        - hasPassword
        - hasGoogleId
        - hasGithubId
        - hasGitlabId
        - hasSamlId
        - hasApiKey
        - analyticsConsent
        - marketingConsent
        - mfaSource
        - firstSignInAt
        - latestSignInAt
        - createdAt
        - deletedAt
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````