Smart Auth Fallback

For Smart Auth fallback, the system ensures maximum success in delivering authentication methods by activating fallback mechanisms when the primary channel encounters delivery issues. This process optimizes user conversion by automatically switching to alternative channels as configured on the dashboard.

Learn more about Smart Auth.

private void onHeadlessCallback(@NonNull final HeadlessResponse response) {
    if (response.getStatusCode() == 200) {
        switch (response.getResponseType()) {
            case "FALLBACK_TRIGGERED":
                // In case of Smart Auth when channel fallback triggered
                final JSONObject fallbackResponse = response.getResponse();
                break;
        }
        JSONObject successResponse = response.getResponse();
    } else {
        // Handle error
        String error = response.getResponse().optString("errorMessage");
    }
}

Multi-Channel Fallback Triggered Response

Response
{
  "statusCode": "200",
  "responseType": "FALLBACK_TRIGGERED",
  "responseData": {
    "channel": "OTP/MOBILE_LOGIN/OTP_LINK/VOICE_CALL",
    "deliveryChannel": "WHATSAPP/SMS/VIBER/VOICE_CALL",
    "requestID": "538bfe617e5347bdac1c911b946c1520",
    "authType": "OTP/MOBILE_LOGIN/OTP_LINK/VOICE_CALL"
  }
}
  • statusCode: "200" – The request was successful.
  • responseType: "FALLBACK_TRIGGERED" – A fallback mechanism was triggered due to failure or timeout in the primary delivery attempt.
  • responseData:
    • channel: "OTP/MOBILE_LOGIN/OTP_LINK/VOICE_CALL" – Multiple authentication methods were attempted.
    • deliveryChannel: "WHATSAPP/SMS/VIBER/VOICE_CALL" – Fallback will use one of these channels.
    • requestID: "538bfe617e5347bdac1c911b946c1520" – Unique identifier for the request.
    • authType: "OTP/MOBILE_LOGIN/OTP_LINK/VOICE_CALL" – Types of authentication methods involved.

This response ensures flexibility by falling back to alternative channels and methods for successful user authentication.