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

# Login app user

> Authenticates a mobile app user using phone number and password, then returns an access token.



## OpenAPI

````yaml api-reference/openapi.json post /login-appuser
openapi: 3.0.0
info:
  title: Cati Main Server API
  version: 1.0.0
  description: >-
    API for managing Cati assistant users, app users, contacts, media,
    notifications and preferences.
servers:
  - url: /
security: []
paths:
  /login-appuser:
    post:
      tags:
        - Authentication & Users
      summary: Login a Mobile App User
      description: >-
        Authenticates a mobile app user using phone number and password, then
        returns an access token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginAppUserRequest'
      responses:
        '200':
          description: Login successful, returns access token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginAppUserResponse'
        '401':
          description: Invalid credentials (phone or password).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Database or server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LoginAppUserRequest:
      type: object
      required:
        - phone
        - password
      properties:
        phone:
          type: string
          example: '+34612345678'
        password:
          type: string
          format: password
          example: mySecurePassword123
    LoginAppUserResponse:
      allOf:
        - $ref: '#/components/schemas/SuccessResponse'
        - type: object
          properties:
            access_token:
              type: string
              description: JWT Access Token for the logged-in app user.
              example: eyJ...
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          example: error
        message:
          type: string
          example: Database connection failed
    SuccessResponse:
      type: object
      properties:
        status:
          type: string
          example: success
        message:
          type: string
          example: Operation completed successfully

````