Skip Navigation

Configuring REST API endpoint connectivity

To configure connectivity between client apps and the 
BlackBerry 2FA
 server's REST API endpoint, you must configure your client applications to trust the 
BlackBerry 2FA
 server.
The client apps are authenticated using HTTP basic authentication (user name and password) which are sent as headers in the request. The REST API endpoint is protected using server authenticated HTTPS (https://
<hostname>
:
<port>
/
<prefix>
/) . The default port is 5443 and the default prefix is "rest." The following REST requests are supported on the endpoint:
Path
Type
Description
Notes
/
<prefix>
/twofactor
POST
Two-factor authentication request
The request message is sent using HTTP POST and is formatted as JSON, with the following parameters:
Parameter
Type
Description
Notes
username
String
User name
password
String
User password, or one-time password and user password
Optional, depending on policy
policy
Integer
Authentication option:
  • 0: Single-factor authentication using enterprise password
  • 1: Two-factor authentication with enterprise password
  • 2: Two-factor authentication with passive device password
  • 3: Two-factor authentication with active device password
oneTimePassword
String
One-time password
Optional
messageTitle
String
Dialog title text
Optional
message
String
Dialog message text
Optional
confirmButtonText
String
Dialog confirm button text
Optional
declineButtonText
String
Dialog decline button text
Optional
timeout
Integer
Dialog timeout (seconds)
Optional
The response message body is formatted as JSON, with the following parameter:
Parameter
Type
Description
Notes
info
String
Informational message
The response message also includes the following HTTP status codes:
Status
Description
Notes
200
OK
Authentication successful
400
Bad request
Invalid parameters
401
Unauthorized 
Authentication failed
403
Declined
User declined authentication
500
Internal server error
Internal error