Overview
This method is used to initiate the VBT process. If VBT type set as PIN, then PIN will be sent along with Verify message. For other VBT types, preset verify message will be sent. Also during the process transaction ticket is generated so that message status can be tracked
Below is the functionality:
For Active Subscribers
Status will not be changed and no verify message will be sent. User will get an error message "Subscriber information already exists"
For Inactive Subscribers
Status of the subscriber will be changed to 'Under Verification' and verify message will be sent to process VBT.
For New Subscribers
Status of the subscriber will be set to 'Under Verification' and verify message will be sent to process VBT.
Syntax
[OperationContractAttribute()] SBT.API.DataContracts.Admin.WSVerificationResponse RequestVBTWithTransactionTicket( string securityToken, string orgCode, string phone )
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 of group for which subscription is made. (For Org and Division codes, the subscription is made to all the groups)
phone
- String[20] (Required) - Phone number with/without country code.
Return Value
WSLoginResponse
NAME | TYPE | DESCRIPTION |
---|---|---|
Result | bool | True/False whether the call was successful or not. |
ErrorCode | int | For Success/Failure it will return an error number. |
Message | string | Message related to the error code |
Pin | string | Unique PIN generated for VBT. (PIN is generated only when VBT type is set as PIN) |
TransactionTicket
|
string | Transaction ticket generated for tracking the VBT message |
Examples
C#
lblError.Text = ""; MessageClient messageResult = new MessageClient("MessageWSServiceHttpEndpoint"); string securityToken = txtToken.Text; ; string orgCode = txtOrgCode.Text; string phoneNo = txtMobileNo.Text; WSVerificationResponse wSVerificationResponse = messageResult.RequestVBTWithTransactionTicket(securityToken, orgCode, phoneNo); 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:RequestVBTWithTransactionTicket> <!--Required:--> <ser:securityToken>Security Token</ser:securityToken> <!--Required:--> <ser:orgCode>Org Code</ser:orgCode> <!--Required:--> <ser:phone>Phone Number</ser:phone> </ser:RequestVBTWithTransactionTicket> </soapenv:Body> </soapenv:Envelope> Soap Response <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Body> <RequestVBTWithTransactionTicketResponse xmlns="http://SBTService/ServiceContracts/"> <RequestVBTWithTransactionTicketResult xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> <a:Result>true</a:Result> <a:ErrorCode>1287</a:ErrorCode> <a:Message>Subscriber and Verification Details Inserted Successfully</a:Message> <a:Pin>Pin</a:Pin> <a:TransactionTicket>Transaction Ticket</a:TransactionTicket> </RequestVBTWithTransactionTicketResult> </RequestVBTWithTransactionTicketResponse> </s:Body> </s:Envelope>
JAVA
MessageWSService srv = new MessageWSService(); IMessage iMessage = srv.getMessageWSServiceHttpEndpoint1(); WSVerificationResponse res = null; String securityToken = "securityToken"; String orgCode = "orgcode"; String phoneNo = "12345678901"; try { res = iMessage.RequestVBTWithTransactionTicket(securityToken, orgCode, phoneNo); } catch (Throwable e) { e.printStackTrace(); } if(res == null ){ System.out.println("Erron::"); return; } if (!res.isResult()) { //handle error System.out.println("ErrorCode::"+res.getErrorCode()); System.out.println("ErrorMessage::"+res.getMessage()); } else { //handle success 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', ); $response = $client->__soapCall('RequestVBTWithTransactionTicket', array($param)); echo '<pre?>'; print_r($response); if($response->RequestVBTWithTransactionTicketResult->Result){ echo $response->RequestVBTWithTransactionTicketResult->Message; echo $response->RequestVBTWithTransactionTicketResult->Id; } else { echo $response->RequestVBTWithTransactionTicketResult->Message; } ?>
REST
Method: POST
JSON Request:
{ "securityToken": "Security Token", "orgCode": "Organization Code", "phone": "Phone Number" }
JSON Response:
{ "RequestVBTWithTransactionTicketResult": { "Result": true, "ErrorCode": 1287, "Message": "Subscriber and Verification Details Inserted Successfully", "Pin": "Pin number", "TransactionTicket": "Transaction Ticket" } }