> ## 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 logincredential

> Performs a agilquest user login with user credentials. The User credentials are defined by a credential type ID and value for authentication.

This operation requires a Credentials Login Request argument, which contains a User Credentials Value and an optional Integer sysidAccount.

The Credential value includes a **sysidCredentialsType** value indicating the numeric Sysid of the
Credentials Type this credential value represents, and a String **credentialsValue** that represents the
required matching value that the login must provide. The Credentials Type is a customer specific value defined for
an individual account in the agilquest System. A Credentials Type includes a boolean value indicating if the type
uses encryption, the name of the type, and a Sysid assigned to the type by the agilquest System.

An example would be a Credentials Type called BAR_CODE with a encryption value of TRUE and a Sysid value of 1. The
barcode value would be the value interpreted from the barcode reader (e.g. from a Badge or some sort of identification)

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



Perhaps the most important information obtained from the authentication results is the **authToken** value obtained from the User
Data. This token is used for most, if not all, subsequent operations involving requests on behalf of the User. These include creating reservations,
viewing resources, viewing locations, and other User based operations.

The User Authentication Token is associated with a session timeout. This timeout value is defined as a property of the Customer's agilquest 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 renews, 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, 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/credential
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/credential:
    post:
      tags:
        - UserLoginService
      description: >-
        Performs a agilquest user login with user credentials. The User
        credentials are defined by a credential type ID and value for
        authentication.


        This operation requires a Credentials Login Request argument, which
        contains a User Credentials Value and an optional Integer sysidAccount.


        The Credential value includes a **sysidCredentialsType** value
        indicating the numeric Sysid of the

        Credentials Type this credential value represents, and a String
        **credentialsValue** that represents the

        required matching value that the login must provide. The Credentials
        Type is a customer specific value defined for

        an individual account in the agilquest System. A Credentials Type
        includes a boolean value indicating if the type

        uses encryption, the name of the type, and a Sysid assigned to the type
        by the agilquest System.


        An example would be a Credentials Type called BAR_CODE with a encryption
        value of TRUE and a Sysid value of 1. The

        barcode value would be the value interpreted from the barcode reader
        (e.g. from a Badge or some sort of identification)


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




        Perhaps the most important information obtained from the authentication
        results is the **authToken** value obtained from the User

        Data. This token is used for most, if not all, subsequent operations
        involving requests on behalf of the User. These include creating
        reservations,

        viewing resources, viewing locations, and other User based operations.


        The User Authentication Token is associated with a session timeout. This
        timeout value is defined as a property of the Customer's agilquest
        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 renews, 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, the authentication token
        is expired.

        The User will have to reauthenticate with the agilquest System to
        reacquire a user authentication token.
      operationId: loginWithCredentials
      parameters: []
      requestBody:
        description: CredentialLoginRequest
        required: false
        content:
          application/json:
            examples:
              example:
                value:
                  sysidAccount: 12345
                  credentialData:
                    sysidUserCredentials: 12345
                    value: ...
                    sysidCredentialsType: 12345
            schema:
              $ref: '#/components/schemas/CredentialLoginRequest'
      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:
    CredentialLoginRequest:
      type: object
      title: CredentialLoginRequest
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            sysidAccount:
              type: integer
              format: int32
            credentialData:
              $ref: '#/components/schemas/UserCredentialsData'
      example:
        sysidAccount: 12345
        credentialData:
          sysidUserCredentials: 12345
          value: ...
          sysidCredentialsType: 12345
    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: {}
    UserCredentialsData:
      type: object
      title: UserCredentialsData
      required:
        - sysidCredentialsType
      allOf:
        - $ref: '#/components/schemas/DependentData'
        - properties:
            sysidUserCredentials:
              type: integer
              format: int32
            value:
              type: string
            sysidCredentialsType:
              type: integer
              format: int32
      example:
        sysidUserCredentials: 12345
        value: ...
        sysidCredentialsType: 12345
    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

````