/
v3.0.11Get access

applyTwoFactorAuthenticationCode

Applies the two-factor authentication code. This command verifies the 2FA token to complete the authentication process.

Request parameters:

Name
DescriptionTypeValuesDefault
code
One-time password code received from enable two factor authenticationstring--
trustPeriod
Defines the duration in days for which the device remains trusted to bypass 2FA. This can represent any specific day count. This field is optional and only applied when is_device_trusted is truenumber--
isDeviceTrusted
Marks whether this device should be trusted for future loginsbooleantrue / false-
deviceFingerprint
A unique, alphanumeric string generated client-side (via @fingerprint-service) that identifies the specific device, browser, and OS configuration. It serves as the value for the device_fingerprint key in the API payload.string--
This method is usually used with these methods:

Call example:

applyTwoFactorAuthenticationCode({
  code: '743963',
  trustPeriod: 7,
  isDeviceTrusted: true,
  deviceFingerprint: 'bKA2l-PgVGORYOiEpVWwlL55zMqMh9QbyI1c'
})

Response examples:

{
  result: 0,
  result_text: null,
  details: {
    AuthenticationStatus: 0
  }
}

Response parameters:

NameDescriptionTypeValues
AuthenticationStatus
The parameter is an integer code representing the current state of the user's session securitynumber-