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

# Get User

> Get user profile endpoint.

MVP: Get user by API Key.

V2:
Return user profile according to the OAuth2 token supplied.
If user not exists - verify OAuth token, retrieve user profile from the
provider and create Haiqu user instance.

Args:
    access_token (str): Token from OAuth provider, Google, IBM, etc.
    api_access_key (str): Haiqu API key, if user got an invitation with HAIQU_API_KEY.

Returns:
    UserModel: User profile object.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /user
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.4.0
servers: []
security: []
paths:
  /user:
    get:
      summary: Get User
      description: |-
        Get user profile endpoint.

        MVP: Get user by API Key.

        V2:
        Return user profile according to the OAuth2 token supplied.
        If user not exists - verify OAuth token, retrieve user profile from the
        provider and create Haiqu user instance.

        Args:
            access_token (str): Token from OAuth provider, Google, IBM, etc.
            api_access_key (str): Haiqu API key, if user got an invitation with HAIQU_API_KEY.

        Returns:
            UserModel: User profile object.
      operationId: get_user_user_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserModel'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    UserModel:
      properties:
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        first_name:
          type: string
          title: First Name
        last_name:
          type: string
          title: Last Name
        api_access_key:
          type: string
          title: Api Access Key
      type: object
      required:
        - email
        - username
        - first_name
        - last_name
        - api_access_key
      title: UserModel
      description: |-
        User model.

        MVP: Haiqu user is created by Haiqu team, auth with username/password.
        V2: Haiqu API user is OAuth authenticated user from IBM, Google, etc.
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````