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

# Authenticate User



## OpenAPI

````yaml /open-api/api-docs.yml post /auth/login
openapi: 3.0.1
info:
  title: Bimetri Api Service API Reference
  description: Bimetri Api Service
  version: v1.4.0-SNAPSHOT
servers:
  - url: https://apigw.bienport.com/api
  - url: https://apigw.sebeketakip.com/api
security: []
tags:
  - name: CRM Ticket Api
    description: Crm Controller
  - name: Camera Api
    description: Camera Controller
  - name: Central Alarm Monitoring Api
    description: Central Alarm Monitoring Controller
  - name: Content Api
    description: Contents Controller
  - name: Controller Api
    description: Controllers Controller
  - name: Controller Log Api
    description: Digital Controller Data Log Controller
  - name: Customer Api
    description: Customer Controller
  - name: Enterprise Bulk Operations Api
    description: Enterprise Bulk Operations Controller
  - name: External Power And Battery Status Api
    description: External Power And Battery Status Controller
  - name: Lead Api
    description: Lead Controller
  - name: Login Api
    description: Auth Controller
  - name: Panel Controllers Api
    description: Resource Controllers Controller
  - name: Panel Sensors Api
    description: Resource Sensor Controller
  - name: Partition Api
    description: Partition Controller
  - name: Payment Api
    description: Payment Controller
  - name: Push Notification Api
    description: Push Notification Controller
  - name: Push Notification History Api
    description: Push Notification History Controller
  - name: Resource Activities Api
    description: Activity Service Controller
  - name: Resource Api
    description: Resource Management Controller
  - name: Resource User Authorization Api
    description: Resource User Authorization Controller
  - name: Role Api
    description: Organization Role Controller
  - name: Sms Verification Code Send Api
    description: Send Verification Code Controller
  - name: Subscription Api
    description: Subscription Controller
  - name: User Api
    description: User Controller
  - name: Validate Verification Code Api
    description: Sms Code Validation Controller
paths:
  /auth/login:
    post:
      tags:
        - Login Api
      summary: Authenticate User
      operationId: authenticateUserUsingPOST
      requestBody:
        description: loginRequest
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LoginRequest'
        required: true
      responses:
        '200':
          description: JWT token, user details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
        '201':
          description: This response is not used.
          content:
            application/json:
              schema:
                type: object
        '401':
          description: This response is not used.
          content: {}
        '403':
          description: This response is not used.
          content: {}
        '404':
          description: ApiErrorResponse not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
        '500':
          description: ApiErrorResponse internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseModel'
      deprecated: false
components:
  schemas:
    LoginRequest:
      title: LoginRequest
      type: object
      properties:
        screenName:
          type: string
          description: Enter phone number.
          example: '905554447788'
        password:
          type: string
          description: Enter your password.
          example: mypass+
        rememberMe:
          type: boolean
          description: Want to be remembered for next entries?
          example: true
    LoginResponse:
      title: LoginResponse
      type: object
      properties:
        token:
          type: string
          description: Token
          example: Bearer Token
        mqUser:
          type: string
          description: Message Queue User Name
          example: messenger
        mqPassword:
          type: string
          description: Message Queue Password
          example: password-here
        userId:
          type: integer
          description: User Id
          format: int64
          example: 11234
        emailAddress:
          type: string
          description: Email Address
        screenName:
          type: string
          description: Screen Name
        localeId:
          type: string
          description: Locale
        roles:
          type: array
          description: Roles
          items:
            $ref: '#/components/schemas/RoleResponse'
        organizations:
          type: array
          description: Organization Ids
          example:
            - name: OrganizationName
              id: '243242'
          items:
            $ref: '#/components/schemas/Organization'
        organizationIds:
          type: array
          description: Organizations
          example:
            - 30339
            - 43567
          items:
            type: integer
            format: int64
        resources:
          type: array
          description: Resources
          items:
            $ref: '#/components/schemas/GetResourceResponse'
    ErrorResponseModel:
      title: ErrorResponseModel
      type: object
      properties:
        statusCode:
          type: integer
          description: Error Code
          format: int32
        error:
          type: string
          description: 'Unique name of the error '
          example: '***Exception'
        message:
          type: string
          description: 'Error message information '
          example: Message about the error
        path:
          type: string
          description: 'Path information where the error occurred '
          example: /api/example/path
      description: Error Response Model
    RoleResponse:
      title: RoleResponse
      type: object
      properties:
        roleId:
          type: integer
          description: Role Id
          format: int64
        roleName:
          type: string
          description: Role Name
        type:
          type: integer
          description: Type
          format: int32
        inherited:
          type: boolean
          description: Inherited
        typePK:
          type: integer
          description: Type Primary Key
          format: int64
        typeName:
          type: string
          description: Type Name
      description: Role response model
    Organization:
      title: Organization
      type: object
      properties:
        name:
          type: string
        id:
          type: integer
          format: int64
      description: Organization
    GetResourceResponse:
      title: GetResourceResponse
      type: object
      properties:
        resourceId:
          type: integer
          format: int64
        networkId:
          type: string
        resourceName:
          type: string
        enabled:
          type: boolean
        modelName:
          type: string
        brandName:
          type: string
        treePath:
          type: string
        orgId:
          type: integer
          format: int64
        resourceSensors:
          type: array
          items:
            $ref: '#/components/schemas/ResourceSensorsGroupedByLabel'
        resourceControllers:
          type: array
          items:
            $ref: '#/components/schemas/ResourceControllerData'
        resourceSubscriptionId:
          type: integer
          format: int64
        subscriptionDocumentNo:
          type: string
        resourceType:
          type: string
          enum:
            - Device
            - ThirdParty
            - Virtual
            - Gateway
        deviceSubType:
          type: string
      description: Get Resource Response Model
    ResourceSensorsGroupedByLabel:
      title: ResourceSensorsGroupedByLabel
      type: object
      properties:
        type:
          type: string
        sensors:
          type: array
          items:
            $ref: '#/components/schemas/ResourceSensorData'
    ResourceControllerData:
      title: ResourceControllerData
      type: object
      properties:
        hardwareSerialNumber:
          type: string
        id:
          type: integer
          format: int64
        resourceId:
          type: integer
          format: int64
        orderNo:
          type: integer
          format: int64
        ioType:
          type: string
          enum:
            - Digital
            - Analog
            - AnalogDigital
            - SerialUSART
            - SerialRS232
            - SerialRS485
            - SerialCAN
            - SerialEthernet
            - SerialI2C
            - SerialSPI
            - SerialOneWire
            - User
            - SerialMdb
            - SerialWireless
        ioDirection:
          type: string
          enum:
            - Input
            - Output
            - InputOutput
        trueValue:
          type: string
        falseValue:
          type: string
        description:
          type: string
        controllerName:
          type: string
        controllerId:
          type: integer
          format: int64
        partitions:
          type: array
          items:
            $ref: '#/components/schemas/ResourcePartitionResponse'
    ResourceSensorData:
      title: ResourceSensorData
      type: object
      properties:
        id:
          type: integer
          format: int64
        resourceId:
          type: integer
          format: int64
        orderNo:
          type: integer
          format: int64
        ioType:
          type: string
          enum:
            - Digital
            - Analog
            - AnalogDigital
            - SerialUSART
            - SerialRS232
            - SerialRS485
            - SerialCAN
            - SerialEthernet
            - SerialI2C
            - SerialSPI
            - SerialOneWire
            - User
            - SerialMdb
            - SerialWireless
        ioDirection:
          type: string
          enum:
            - Input
            - Output
            - InputOutput
        trueValue:
          type: string
        falseValue:
          type: string
        partitions:
          type: array
          items:
            $ref: '#/components/schemas/ResourcePartitionResponse'
        sensorId:
          type: integer
          format: int64
        description:
          type: string
        hardwareSerialNumber:
          type: string
        sensorName:
          type: string
    ResourcePartitionResponse:
      title: ResourcePartitionResponse
      type: object
      properties:
        name:
          type: string
        'no':
          type: integer
          format: int32

````