REST API - Two-Factor Authentication Status of a User: GET

Updated

Returns information about a user's two-factor authentication settings.

Request

Syntax

GET <webservice>/Security/TwoFactorAuth/Status?username={username} HTTP/1.1

Host: <host name>

Accept: application/xml

where <webservice> is the root path used to route the API requests to the Web Server.

For more information, see Available Web Services for REST API.

Request Parameters

Parameter

Description

username

The username of the account.

Request Headers

Header

Description

Host

The host name of the Web Server or Web Console used in the API request.

Accept

The format of the response. Valid values are: application/xml or application/json.

Response

Response Parameters

Parameter

Description

isTwoFactorAuthenticationEnabled

A Boolean corresponding to whether two-factor authentication is enabled for the user. Valid values are:

  • 0 (XML), false (JSON): The user is not configured for two-factor authentication.

  • 1 (XML), true (JSON): Two-factor authentication is enabled for the user.

userEmail

The email associated to the username included in the request.

Examples

Example Request

GET <webservice>/Security/TwoFactorAuth/Pin?username=user

Host: client.mydomain.com

Accept: application/xml

Example Responses

XML

<Api_GetTwoFactorAuthenticationInfoResponse>  <twoFactorInfo isTwoFactorAuthenticationEnabled="0" userEmail="user@company.com" />

</Api_GetTwoFactorAuthenticationInfoResponse>

JSON

{  "twoFactorInfo": {    "isTwoFactorAuthenticationEnabled": false,    "userEmail": "user@company.com"  }

}