> For AI agents: [llms.txt](https://docs.trustedauth.com/llms.txt) provides a Markdown index of this documentation.

# Get OTP authenticator settings

`GET /api/web/v3/settings/otp`

Get OTP authenticator settings. Caller requires the SETTINGS:VIEW permission.

## Responses

### 200

Successful

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "defaultDeliveryEnabled": {
      "type": "boolean",
      "description": "Indicates whether client applications can delivery OTP to default delivery contact or can enforce users to choose an OTP delivery.",
      "example": true
    },
    "deliveryMethods": {
      "type": "array",
      "description": "The allowed OTP delivery mechanisms in order of preference. Default is SMS, followed by Email, and Voice. ",
      "deprecated": true,
      "items": {
        "type": "object",
        "properties": {
          "enabled": {
            "type": "boolean",
            "description": "Whether the method is enabled.",
            "example": true
          },
          "name": {
            "type": "string",
            "description": "The OTP delivery method type.",
            "example": "EMAIL",
            "enum": [
              "EMAIL",
              "SMS",
              "VOICE",
              "WECHAT",
              "WHATSAPP"
            ]
          }
        },
        "description": "OTPDeliveryMethod",
        "title": "OTPDeliveryMethod"
      }
    },
    "includeOtpExpiryDate": {
      "type": "boolean",
      "description": "Indicates whether the OTP expiry date will be included in the OTP SMS message",
      "example": true
    },
    "otpAlphabet": {
      "type": "string",
      "description": "Characters that can appear in a RANDOM OTP. Can contain any non-whitespace character. Default is all digits. "
    },
    "otpDefaultDelivery": {
      "type": "string",
      "description": "The default OTP delivery mechanism. This attribute is deprecated, use the deliveryMethods attribute.",
      "deprecated": true,
      "enum": [
        "EMAIL",
        "SMS",
        "VOICE",
        "WECHAT",
        "WHATSAPP",
        "NONE"
      ]
    },
    "otpDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default OTP delivery attribute. Deprecated : Use default attribute specific to delivery mechanism instead eg. otpSmsDefaultDeliveryAttribute, otpEmailDefaultDeliveryAttribute",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "otpDeliveryPreference": {
      "type": "array",
      "description": "Indicates the order preference to use for OTP delivery.",
      "items": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "contactAttributes": {
            "type": "array",
            "description": "A list of uuids of the otp contact attributes in order which indicates the OTP contacts preference.",
            "items": {
              "type": "string",
              "description": "A list of uuids of the otp contact attributes in order which indicates the OTP contacts preference."
            }
          },
          "type": {
            "type": "string",
            "description": "Indicates the type of the otp preference details.",
            "example": "SMS",
            "enum": [
              "EMAIL",
              "SMS",
              "VOICE",
              "WECHAT",
              "WHATSAPP",
              "NONE"
            ]
          }
        },
        "description": "Settings that control the behavior of OTP authentication.",
        "title": "OTPPreferenceDetails"
      }
    },
    "otpEmailDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default Email OTP delivery attribute.",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "otpLength": {
      "maximum": 100,
      "minimum": 4,
      "type": "integer",
      "description": "The length of an OTP. Default is 8.",
      "format": "int32"
    },
    "otpLifetime": {
      "maximum": 3600,
      "minimum": 60,
      "type": "integer",
      "description": "The lifetime of an OTP in seconds. Default is 300.",
      "format": "int32"
    },
    "otpSMSFormat": {
      "type": "string",
      "description": "The format of SMS messages when delivering an OTP SMS message. Default is SERVICENAME_OTP.",
      "enum": [
        "SERVICENAME_OTP",
        "OTP_SERVICENAME"
      ]
    },
    "otpSmsDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default SMS OTP delivery attribute.",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "otpType": {
      "type": "string",
      "description": "The type of OTP generated.  Choices are RANDOM or MEMO_PASSCODE. Default is RANDOM",
      "enum": [
        "RANDOM",
        "MEMO_PASSCODE"
      ]
    },
    "otpVoiceDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default Voice OTP delivery attribute.",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "otpWeChatDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default WeChat OTP delivery attribute.",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "otpWhatsappDefaultDeliveryAttribute": {
      "type": "string",
      "description": "Id of the default Whatsapp OTP delivery attribute.",
      "example": "360e0c3d-27d7-405b-81db-0524fa8f41bd",
      "deprecated": true
    },
    "showOtpDeliveryContact": {
      "type": "boolean",
      "description": "Indicates whether masked OTP contact attribute values are included in authentication API."
    }
  },
  "description": "New OTP authenticator settings.",
  "title": "OTPAuthenticatorSettings"
}
```

### 400

Bad Request

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 401

Access denied

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 403

Forbidden

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 404

Not Found

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

### 409

Conflict

#### application/json

Schema

```json
{
  "type": "object",
  "properties": {
    "errorCode": {
      "type": "string",
      "description": "Error Codes specific to cause of failure.",
      "example": "invalid_user_response"
    },
    "errorMessage": {
      "type": "string",
      "description": "Additional Error Message describing the error.",
      "example": "Application id cannot be null"
    },
    "parameters": {
      "type": "array",
      "description": "Optional additional error information.",
      "items": {
        "type": "object",
        "description": "Optional additional error information."
      }
    }
  },
  "description": "Object containing information about errors reported by services.",
  "title": "ErrorInfo"
}
```

## Security

Requirements

```json
[
  {
    "AdminAPIAuthentication": [
      "SETTINGS:VIEW"
    ]
  }
]
```
