Overview

This method is used to verify the pin for a phone number. This method is used when VBT type is set to PIN.

Syntax

C#

[OperationContractAttribute()]
SBT.API.DataContracts.Admin.WSVerificationResponse ConfirmVBT(
   string securityToken,
   string orgCode,
   string phone,
   string pin
)

WSDL

 

Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/MessageWSService.svc?singlewsdl

Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/WSServices/MessageWSService.svc?singlewsdl

 

Parameters

securityToken

– String[1000] (Required) – SecurityToken to authenticate the user

orgCode

– String[20] (Required) – Default Organization Code where VBT is initiated

phone

– String[20] (Required) – Phone number with/without country code that the pin was sent to.

pin

– String[10] (Required) – Generated pin.

 

Return Value

WSVerificationResponse

Name Type Description

Result

Bool

True/False whether the call was successful or not.

ErrorCode

Int

For Success/Failure it will return error number.

Message

String

Message related to the error code

Verified

Bool

Verification pin status.

 
 

Examples

C#
MessageClient messageResult = new MessageClient("MessageWSServiceHttpEndpoint");
    string securityToken = txtToken.Text;
    string orgCode = txtOrgCode.Text;
    string phoneNo = txtMobileNo.Text; ;
    string pin = txtPin.Text;

    WSVerificationResponse wSVerificationResponse = messageResult.ConfirmVBT(securityToken, orgCode, phoneNo, pin);

        if (!wSVerificationResponse.Result)
            {
                //handle error
                lblError.Text = wSVerificationResponse.Message;
            }
        else
            {
                //handle success
                lblError.Text = wSVerificationResponse.Message;
            }
 
SOAP
 
Soap Request 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:ConfirmVBT>
         <!--Required:-->
         <ser:securityToken>Security Token</ser:securityToken>
         <!--Required:-->
         <ser:orgCode>Org Code</ser:orgCode>
         <!--Required:-->
         <ser:phone>Phone Number</ser:phone>
         <!--Required:-->
         <ser:pin>Latest Generated PIN</ser:pin>
      </ser:ConfirmVBT>
   </soapenv:Body>
</soapenv:Envelope>

            
 Soap Response
            
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <ConfirmVBTResponse xmlns="http://SBTService/ServiceContracts/">
<ConfirmVBTResult z:Id="i1" xmlns:a="http://SBTAPIService/DataContract/" xmlns:i=http://www.w3.org/2001/XMLSchema-instance xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
            <a:Result>true</a:Result>
            <a:ErrorCode>1026</a:ErrorCode>
            <a:Message>Pin verified successfully</a:Message>
            <a:Verified>true</a:Verified>
         </ConfirmVBTResult>
      </ConfirmVBTResponse>
   </s:Body>
</s:Envelope>



 
JAVA
MessageWSService srv = new MessageWSService();
   IMessage iMessage = srv.getMessageWSServiceHttpEndpoint1();
   WSVerificationResponse res = null;

   String securityToken = "securityToken";
   String orgCode = "5hi60s8";
   String phone = "12345678901";
   String pin = "li"; 
   try {
	  res = iMessage.confirmVBT(securityToken, orgCode, phone, pin);

   } catch (Throwable e) {
	  e.printStackTrace();
   }

   if(res == null ){
	   System.out.println("Erron::");
	   return;

  }
  if (res.isResult() == null || !res.isResult())
  {
	   //handle error
	   System.out.println("ErrorCode::"+res.getErrorCode());
	   System.out.println("ErrorMessage::"+res.getMessage().getValue());
  }
  else
  {
	   //handle successM
	   System.out.println("ID::"+res.getId());
	   System.out.println("Message::"+res.getMessage().getValue());
  }

PHP
<?php
    $client = new SoapClient("https://ui.solutionsbytext.com/Sbt.App.SetUp/wsservices/MessageWSService.svc?wsdl");
  $param = array( 
'securityToken' => 'securityToken',
	'orgCode' => 'orgCode',
	'phone' => '12345678999',
	'pin' => 'PIN',
);
$response = $client->__soapCall('ConfirmVBT', array($param));
echo '<pre/>';
print_r($response);
if($response->ConfirmVBTResult->Result){
	echo 'Message: '.$response->ConfirmVBTResult->Message;
}
else {
	echo 'Message: '.$response->ConfirmVBTResult->Message;
}

?>

REST

Method: POST

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/MessageRSService.svc/ConfirmVBT

Sample C# Code:

var requestdata = new
            {
                securityToken = "validsecurityToken",
                orgCode = "orgCode",
                phone = "1234567891",
                pin = "1567981"
            };

            string data2 = JsonConvert.SerializeObject(requestdata).ToString();            

            System.Net.WebClient webClient = new System.Net.WebClient();
            webClient.Headers["Content-type"] = "application/json";
            webClient.Encoding = Encoding.UTF8;

var strConfirmVBTResponse = webClient.UploadString("https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/MessageRSService.svc/ConfirmVBT", "POST", data2);
Note:“strConfirmVBTResponse” contains the output response as return values 

 

Response:

The response will be in JSON format like below:

{" ConfirmVBTResult": {
   "Result": true,
   "ErrorCode": 1026,
   "Message": " Pin verified Successfully",
   “Verified”: true
}}

 

 

Send Feedback