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

# Post login

> Performs a user login to the agilquest system. The Application authentication token is required to identify the application
it represents. The Application Authentication token is included as an HTTP header value under the custom header
field **AQOB-AppAuthToken** . The POSTed **LoginData** information includes the following information:

On successful Login, this operation will return a User Auth Response value with account and User information, including the User Authentication Token.



The **authToken** value of the User Data returned from this operation is used to verify the rights
and permissions of the User for all subsequent calls. Request for reservations, editing locations and resources,
and other operations require a valid User Authentication Token in order to execute.

The User Authentication Token is associated with a session timeout. This timeout value is defined as a property of the Customer's System
configuration properties - that is, for a particular Account in the agilquest System.

Each time the User Authentication Token is submitted for an operation, it is checked to see if the token session has timed out. If the user session
has not timed out, the session is renewed, i.e. that session elapsed time is reset to zero (0).

If the User Authentication Token is inactive for the period of time defined by the session time out property, meaning that the User performs
no operations in the agilquest System and does not submit their authentication token to the agilquest System within that time period, the authentication token is expired.
The User will have to reauthenticate with the agilquest System to reacquire a user authentication token.



## OpenAPI

````yaml /tango_reserve/integrations/guides/auth.yaml post /login
openapi: 3.1.0
info:
  description: auth
  version: '2.0'
  title: Reserve Auth API
servers:
  - url: /auth/
security: []
tags:
  - name: ApplicationDomainService
    description: |-
      This service handles retrieving Authentication Domain values for an
      application.
  - name: ApplicationLoginService
    description: Handles application authentication.
  - name: LogoutService
    description: Provides user logout services.
  - name: UserLoginService
  - name: UserPasswordService
    description: Handles password managing.
paths:
  /login:
    post:
      tags:
        - UserLoginService
      description: >-
        Performs a user login to the agilquest system. The Application
        authentication token is required to identify the application

        it represents. The Application Authentication token is included as an
        HTTP header value under the custom header

        field **AQOB-AppAuthToken** . The POSTed **LoginData** information
        includes the following information:


        On successful Login, this operation will return a User Auth Response
        value with account and User information, including the User
        Authentication Token.




        The **authToken** value of the User Data returned from this operation is
        used to verify the rights

        and permissions of the User for all subsequent calls. Request for
        reservations, editing locations and resources,

        and other operations require a valid User Authentication Token in order
        to execute.


        The User Authentication Token is associated with a session timeout. This
        timeout value is defined as a property of the Customer's System

        configuration properties - that is, for a particular Account in the
        agilquest System.


        Each time the User Authentication Token is submitted for an operation,
        it is checked to see if the token session has timed out. If the user
        session

        has not timed out, the session is renewed, i.e. that session elapsed
        time is reset to zero (0).


        If the User Authentication Token is inactive for the period of time
        defined by the session time out property, meaning that the User performs

        no operations in the agilquest System and does not submit their
        authentication token to the agilquest System within that time period,
        the authentication token is expired.

        The User will have to reauthenticate with the agilquest System to
        reacquire a user authentication token.
      operationId: loginUser
      parameters: []
      requestBody:
        description: LoginData
        required: false
        content:
          application/json:
            examples:
              example:
                value:
                  emailAddress: ...
                  password: ...
            schema:
              $ref: '#/components/schemas/LoginData'
      responses:
        '201':
          content:
            application/json:
              examples:
                example:
                  value:
                    accountName: ...
                    appName: ...
                    customRules:
                      - name: ...
                        sysidCustomRuleType: 12345
                        userRuleDefinitions:
                          - languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidUserCustomRuleDefinition: 12345
                            description: ...
                            name: ...
                          - languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidUserCustomRuleDefinition: 12345
                            description: ...
                            name: ...
                        description: ...
                        sysidCustomExecutionPoint: 12345
                        venueRuleDefinitions:
                          - description: ...
                            languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidVenueCustomRuleDefinition: 12345
                            name: ...
                          - description: ...
                            languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidVenueCustomRuleDefinition: 12345
                            name: ...
                        languageTagKey: ...
                      - name: ...
                        sysidCustomRuleType: 12345
                        userRuleDefinitions:
                          - languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidUserCustomRuleDefinition: 12345
                            description: ...
                            name: ...
                          - languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidUserCustomRuleDefinition: 12345
                            description: ...
                            name: ...
                        description: ...
                        sysidCustomExecutionPoint: 12345
                        venueRuleDefinitions:
                          - description: ...
                            languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidVenueCustomRuleDefinition: 12345
                            name: ...
                          - description: ...
                            languageTagKey: ...
                            sysidAttributeDataType: 12345
                            sysidVenueCustomRuleDefinition: 12345
                            name: ...
                        languageTagKey: ...
                    allowICS: true
                    userData:
                      sysidDefaultLocation: 12345
                      sysidApplicationUser: 12345
                      preferredName: ...
                      sysidDefaultResType: 12345
                      lastName: ...
                      authToken: ...
                      maxFutureReservationDays: 12345
                      userAuthRules:
                        - sysidAuthorizationRule: 12345
                        - sysidAuthorizationRule: 12345
                      sysidRole: 12345
                      sysidDefaultResCategory: 12345
                      sysidLanguage: 12345
                      preferences:
                        - value: ...
                          comment: ...
                          key: ...
                        - value: ...
                          comment: ...
                          key: ...
                      firstName: ...
                      reservationSpendingLimit: 12345
                      middleInitial: ...
                      sysidHomeLocation: 12345
                      defaultChargeCode: ...
                    accountOwner: true
                    sysidAccount: 12345
                    forumList:
                      - visited: true
                        name: ...
                        sysid: 12345
                        homeForum: true
                      - visited: true
                        name: ...
                        sysid: 12345
                        homeForum: true
                    sysidApplication: 12345
              schema:
                $ref: '#/components/schemas/UserAuthResponse'
          description: >-
            AuthResponse (or Response(AgilquestExceptionData) if there are any
            agilquest Exceptions)
      security:
        - AppAuthToken: []
components:
  schemas:
    LoginData:
      type: object
      title: LoginData
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            emailAddress:
              type: string
            password:
              type: string
      example:
        emailAddress: ...
        password: ...
    UserAuthResponse:
      type: object
      title: UserAuthResponse
      required:
        - allowICS
        - accountOwner
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            accountName:
              type: string
            appName:
              type: string
            customRules:
              type: array
              items:
                $ref: '#/components/schemas/CustomRuleData'
            allowICS:
              type: boolean
            userData:
              $ref: '#/components/schemas/UserAuthData'
            accountOwner:
              type: boolean
            sysidAccount:
              type: integer
              format: int32
            forumList:
              type: array
              items:
                $ref: '#/components/schemas/UserPublishedForum'
            sysidApplication:
              type: integer
              format: int32
      example:
        accountName: ...
        appName: ...
        customRules:
          - name: ...
            sysidCustomRuleType: 12345
            userRuleDefinitions:
              - languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidUserCustomRuleDefinition: 12345
                description: ...
                name: ...
              - languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidUserCustomRuleDefinition: 12345
                description: ...
                name: ...
            description: ...
            sysidCustomExecutionPoint: 12345
            venueRuleDefinitions:
              - description: ...
                languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidVenueCustomRuleDefinition: 12345
                name: ...
              - description: ...
                languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidVenueCustomRuleDefinition: 12345
                name: ...
            languageTagKey: ...
          - name: ...
            sysidCustomRuleType: 12345
            userRuleDefinitions:
              - languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidUserCustomRuleDefinition: 12345
                description: ...
                name: ...
              - languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidUserCustomRuleDefinition: 12345
                description: ...
                name: ...
            description: ...
            sysidCustomExecutionPoint: 12345
            venueRuleDefinitions:
              - description: ...
                languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidVenueCustomRuleDefinition: 12345
                name: ...
              - description: ...
                languageTagKey: ...
                sysidAttributeDataType: 12345
                sysidVenueCustomRuleDefinition: 12345
                name: ...
            languageTagKey: ...
        allowICS: true
        userData:
          sysidDefaultLocation: 12345
          sysidApplicationUser: 12345
          preferredName: ...
          sysidDefaultResType: 12345
          lastName: ...
          authToken: ...
          maxFutureReservationDays: 12345
          userAuthRules:
            - sysidAuthorizationRule: 12345
            - sysidAuthorizationRule: 12345
          sysidRole: 12345
          sysidDefaultResCategory: 12345
          sysidLanguage: 12345
          preferences:
            - value: ...
              comment: ...
              key: ...
            - value: ...
              comment: ...
              key: ...
          firstName: ...
          reservationSpendingLimit: 12345
          middleInitial: ...
          sysidHomeLocation: 12345
          defaultChargeCode: ...
        accountOwner: true
        sysidAccount: 12345
        forumList:
          - visited: true
            name: ...
            sysid: 12345
            homeForum: true
          - visited: true
            name: ...
            sysid: 12345
            homeForum: true
        sysidApplication: 12345
    DependentData:
      type: object
      title: DependentData
      example: {}
    CustomRuleData:
      type: object
      title: CustomRuleData
      required:
        - sysidCustomRuleType
        - sysidCustomExecutionPoint
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            name:
              type: string
            sysidCustomRuleType:
              type: integer
              format: int32
            userRuleDefinitions:
              type: array
              items:
                $ref: '#/components/schemas/UserCustomRuleDefinition'
            description:
              type: string
            sysidCustomExecutionPoint:
              type: integer
              format: int32
            venueRuleDefinitions:
              type: array
              items:
                $ref: '#/components/schemas/VenueCustomRuleDefinition'
            languageTagKey:
              type: string
      example:
        name: ...
        sysidCustomRuleType: 12345
        userRuleDefinitions:
          - languageTagKey: ...
            sysidAttributeDataType: 12345
            sysidUserCustomRuleDefinition: 12345
            description: ...
            name: ...
          - languageTagKey: ...
            sysidAttributeDataType: 12345
            sysidUserCustomRuleDefinition: 12345
            description: ...
            name: ...
        description: ...
        sysidCustomExecutionPoint: 12345
        venueRuleDefinitions:
          - description: ...
            languageTagKey: ...
            sysidAttributeDataType: 12345
            sysidVenueCustomRuleDefinition: 12345
            name: ...
          - description: ...
            languageTagKey: ...
            sysidAttributeDataType: 12345
            sysidVenueCustomRuleDefinition: 12345
            name: ...
        languageTagKey: ...
    UserAuthData:
      type: object
      title: UserAuthData
      required:
        - maxFutureReservationDays
        - sysidRole
        - sysidLanguage
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            sysidDefaultLocation:
              type: integer
              format: int32
            sysidApplicationUser:
              type: integer
              format: int32
            preferredName:
              type: string
            sysidDefaultResType:
              type: integer
              format: int32
            lastName:
              type: string
            authToken:
              type: string
            maxFutureReservationDays:
              type: integer
              format: int32
            userAuthRules:
              type: array
              items:
                $ref: '#/components/schemas/UserAuthRule'
            sysidRole:
              type: integer
              format: int32
            sysidDefaultResCategory:
              type: integer
              format: int32
            sysidLanguage:
              type: integer
              format: int32
            preferences:
              type: array
              items:
                $ref: '#/components/schemas/UserPreferencesData'
            firstName:
              type: string
            reservationSpendingLimit:
              type: integer
              format: int32
            middleInitial:
              type: string
            sysidHomeLocation:
              type: integer
              format: int32
            defaultChargeCode:
              type: string
      example:
        sysidDefaultLocation: 12345
        sysidApplicationUser: 12345
        preferredName: ...
        sysidDefaultResType: 12345
        lastName: ...
        authToken: ...
        maxFutureReservationDays: 12345
        userAuthRules:
          - sysidAuthorizationRule: 12345
          - sysidAuthorizationRule: 12345
        sysidRole: 12345
        sysidDefaultResCategory: 12345
        sysidLanguage: 12345
        preferences:
          - value: ...
            comment: ...
            key: ...
          - value: ...
            comment: ...
            key: ...
        firstName: ...
        reservationSpendingLimit: 12345
        middleInitial: ...
        sysidHomeLocation: 12345
        defaultChargeCode: ...
    UserPublishedForum:
      type: object
      title: UserPublishedForum
      required:
        - visited
        - sysid
        - homeForum
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            visited:
              type: boolean
            name:
              type: string
            sysid:
              type: integer
              format: int32
            homeForum:
              type: boolean
      example:
        visited: true
        name: ...
        sysid: 12345
        homeForum: true
    UserCustomRuleDefinition:
      type: object
      title: UserCustomRuleDefinition
      required:
        - sysidAttributeDataType
        - sysidUserCustomRuleDefinition
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            languageTagKey:
              type: string
            sysidAttributeDataType:
              type: integer
              format: int32
            sysidUserCustomRuleDefinition:
              type: integer
              format: int32
            description:
              type: string
            name:
              type: string
      example:
        languageTagKey: ...
        sysidAttributeDataType: 12345
        sysidUserCustomRuleDefinition: 12345
        description: ...
        name: ...
    VenueCustomRuleDefinition:
      type: object
      title: VenueCustomRuleDefinition
      required:
        - sysidAttributeDataType
        - sysidVenueCustomRuleDefinition
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            description:
              type: string
            languageTagKey:
              type: string
            sysidAttributeDataType:
              type: integer
              format: int32
            sysidVenueCustomRuleDefinition:
              type: integer
              format: int32
            name:
              type: string
      example:
        description: ...
        languageTagKey: ...
        sysidAttributeDataType: 12345
        sysidVenueCustomRuleDefinition: 12345
        name: ...
    UserAuthRule:
      type: object
      title: UserAuthRule
      required:
        - sysidAuthorizationRule
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            sysidAuthorizationRule:
              type: integer
              format: int32
      example:
        sysidAuthorizationRule: 12345
    UserPreferencesData:
      type: object
      title: UserPreferencesData
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            value:
              type: string
            comment:
              type: string
            key:
              type: string
      example:
        value: ...
        comment: ...
        key: ...
  securitySchemes:
    AppAuthToken:
      type: apiKey
      in: header
      name: AQOB-AppAuthToken

````