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

# Get current user's PSK information

> Retrieves the PSK information for the currently logged-in user.

**IMPORTANT**: Adhere to the following:
- The actual PSK value is not returned for security reasons. If you need the PSK, you must regenerate it.
- Authentication requires a Keycloak token. A PSK auth isn't allowed.



## OpenAPI

````yaml get /api/user/psk
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/user/psk:
    get:
      tags:
        - User PSK management
      summary: Get current user's PSK information
      description: >-
        Retrieves the PSK information for the currently logged-in user.


        **IMPORTANT**: Adhere to the following:

        - The actual PSK value is not returned for security reasons. If you need
        the PSK, you must regenerate it.

        - Authentication requires a Keycloak token. A PSK auth isn't allowed.
      operationId: get_user_psk_api_user_psk_get
      responses:
        '200':
          description: PSK information retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserPskResponse'
        '403':
          description: 'Forbidden: Keycloak token required.'
        '404':
          description: No PSK found for this user.
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    UserPskResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: Unique ID of the user PSK.
        user_id:
          type: string
          title: User Id
          description: The user ID associated with this PSK.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Optional description for the PSK.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: Timestamp when the PSK was created.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the PSK was last updated.
        last_used_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Used At
          description: Timestamp when the PSK was last used.
        is_active:
          type: boolean
          title: Is Active
          description: Whether the PSK is active.
      type: object
      required:
        - id
        - user_id
        - created_at
        - updated_at
        - is_active
      title: UserPskResponse
      description: >-
        Response model for user PSK information. It doesn't include the actual
        PSK.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````