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

# Validate Two-Factor Authentication

> Processes and verifies two-factor authentication keys.

<Note>
  Use the [**<u>Login</u>**<u> endpoint</u>](/api-reference/user/logs-a-user-in) to retrieve the **`SessionKey`**, then include it in the **Authorization** field for authentication.
</Note>


## OpenAPI

````yaml post /v1/Users/2FAKey
openapi: 3.0.0
info:
  version: v2
  title: Credit Risk Monitor API
servers:
  - url: https://api.creditriskmonitor.com
security: []
paths:
  /v1/Users/2FAKey:
    post:
      tags:
        - User
      summary: Accepts a Two Factor Authentication Key
      operationId: User_Accept2FAKey
      parameters:
        - name: Key
          in: query
          description: The One Time Password that was sent to the users phone.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIResponseContainer_APILogin_'
            text/json:
              schema:
                $ref: '#/components/schemas/APIResponseContainer_APILogin_'
            text/html:
              schema:
                $ref: '#/components/schemas/APIResponseContainer_APILogin_'
            application/xml:
              schema:
                $ref: '#/components/schemas/APIResponseContainer_APILogin_'
            text/xml:
              schema:
                $ref: '#/components/schemas/APIResponseContainer_APILogin_'
      security:
        - Bearer: []
components:
  schemas:
    APIResponseContainer_APILogin_:
      description: ''
      type: object
      properties:
        Success:
          description: ''
          type: boolean
        Data:
          $ref: '#/components/schemas/APILogin'
        ErrorCode:
          description: ''
          type: string
    APILogin:
      description: ''
      type: object
      properties:
        SessionKey:
          description: >-
            The Session Key for the user. This Session Key must be sent in the
            header of all subsequent calls.
          type: string
        Username:
          description: Username for the logged in user.
          type: string
        SessionId:
          format: int32
          description: Session Id
          type: integer
        TwoFactorAuthenticationRequired:
          description: >-
            True when Two Factor Authentication is required for this login. A
            One Time Password will be sent to the phone number on record for the
            user account. Make a subsiquent request to the /v1/Users/2FAKey
            endpoint with the One Time Password to complete Two Factor
            Authentication.
          type: boolean
        Key:
          description: >-
            When the User account is setup for Device/Browser verification this
            field will contain a value. Send this value with subsequent requests
            to /v1/Users/LoginBrowser to remember 2FA verification requests.
          type: string
  securitySchemes:
    Bearer:
      type: http
      scheme: bearer
      description: >-
        Enter the Session Key with the `Bearer ` prefix, e.g. "Bearer
        abcde12345".

````