Developer Guide

Get Verification Result

Verify that an OTP sent by the Send SMS Verification API is valid.


Parameter Description
key (required) FraudLabs Pro API key.
tran_id (required) The unique ID that was returned by the Send Verification SMS API that triggered the OTP sms.
otp (required) The OTP that was sent to the recipient’s phone.
format (optional) Returns the API response in json (default) or xml format.
Valid values: json | xml


Parameter Description
result Indicates if the input parameters matched a valid OTP. Y if a valid OTP is found and N if no valid OTP found.
error Blank if there is no error otherwise it will contain one of the errors below:
Invalid transaction ID.
Invalid OTP.
API key not found.
OTP Timeout.

Sample Codes

require_once 'lib/FraudLabsPro.php';

// Configures FraudLabs Pro API key

// Get SMS Verification result
	'tran_id'		=> 'UNIQUE_TRANS_ID',
	'otp'			=> 'OTP_RECEIVED',
import com.fraudlabspro.*;
import java.util.Hashtable;

public class FLP {

    public static void main(String[] args) {
        // Configures FraudLabs Pro API key
        FraudLabsPro.APIKEY = "YOUR_API_KEY";

        // Get Verification Result API
        SMSVerification verification = new SMSVerification();

        // Sets transaction ID and otp details for verification purpose
        Hashtable data = new Hashtable<>();
        data.put("tran_id", "UNIQUE_TRANS_ID");
        data.put("otp", "OTP_RECEIVED");

        String result = verification.verifySMS(data);
Imports FraudLabsPro.FraudLabsPro
Public Class WebForm5
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        'Configure FraudLabs Pro API KEY
        FraudLabsProConfig.APIKey = "YOUR_API_KEY"
        'Get Verification Result API
        Dim Get_Verification_Result As New SMSVerification

        'Sets SMS details for authentication purpose
        Dim SMS_Details As New SMSVerificationPara
        SMS_Details.TransactionID = "UNIQUE_TRANS_ID"
        SMS_Details.OTP = "OTP_RECEIVED"

        Dim result = Get_Verification_Result.VerifySMS(SMS_Details)
         Response.Write("Result: " + result.Result + "</br>")
        Response.Write("Error: " + result.Error + "</br>")
    End Sub
End Class
using FraudLabsPro.FraudLabsPro;

public class WebForm5 : System.Web.UI.Page
    protected void Page_Load(object sender, System.EventArgs e)
        // Configure FraudLabs Pro API KEY
        FraudLabsProConfig.APIKey = "YOUR_API_KEY";
        // Get Verification Result API
        SMSVerification Get_Verification_Result = new SMSVerification();

        // Sets SMS details for authentication purpose
        SMSVerificationPara SMS_Details = new SMSVerificationPara();
        SMS_Details.TransactionID = "UNIQUE_TRANS_ID";
        SMS_Details.OTP = "OTP_RECEIVED";

        var result = Get_Verification_Result.VerifySMS(SMS_Details);
        Response.Write("Result: " + result.Result + "</br>");
        Response.Write("Error: " + result.Error + "</br>");
 # Import SDK to use the function
from libs.smsverification import SMSVerification

 # Configure your API key
api_key = 'YOUR_API_KEY'

verify_sms_variables = {
	'key': api_key,
	'tran_id': 'UNIQUE_TRANS_ID',
	'otp': 'OTP_RECEIVED',
$ curl -X POST \
	-d "key=Enter_License_Key" \
	-d "format=json" \
	-d "tran_id=Enter_Transaction_ID" \
require 'fraudlabspro_ruby'

FraudlabsproRuby::Configuration.api_key = 'YOUR_API_KEY'

result = FraudlabsproRuby::Api::SMSVerification.verifySMS(
  tran_id: 'UNIQUE_TRANS_ID',
const {SMSVerification} = require("fraudlabspro-nodejs");

var sms = new SMSVerification('YOUR API KEY');

params = {
	tran_id: 'UNIQUE_TRANS_ID',
sms.verifyOTP(params, (err, data) => {
	if (!err) {