Business at the Speed of Text

Take a few minutes to watch how Solutions by Text can provide you with a compliant solution to enhance the customer experience and increase your bottom line through the power of texting.

Watch Videos

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

Business at the Speed of Text

Take a few minutes to watch how Solutions by Text can provide you with a compliant solution to enhance the customer experience and increase your bottom line through the power of texting.

Watch Videos

We're here for you.

Solutions by Text offers 24 hour support - both online and offline.

Give us a Call

Two-Way Texting Changes the Game

Put real-time text responses in your customers’ pockets and real-time access at your staff’s fingertips.

Find Out More

See What's New

Solutions by Text continues to evolve and develop its suite of products and features. Take a look at what's new in our world.

Read more

We Work With the Best

From retail to financial solutions, we’re constantly working with our clients to push the boundaries and find new ways to leverage SMS for business.

See Our Success Stories

Overview

Get the status of a subscriber based on an Orgcode. If you provide parent level Org Code, then it will display all the groups under the parent and status of the subscribers.

Note: Phone list allows a maximum of 100 mobile numbers.

Syntax

C#

[OperationContractAttribute()]
SBT.API.DataContracts.Admin.WSSubscribersStatusResponse GetSubscribersStatus(
  string securityToken,
  string  orgCode,
  List  phone
)

 

WSDL

Production: https://ui.solutionsbytext.com/Sbt.App.SetUp/WSServices/subscriberWSService.svc?singleWsdl

Staging: https://test.solutionsbytext.com/Sbt.App.SetUp/WSServices/subscriberWSService.svc?singleWsdl

 

 

Parameters

securityToken

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

orgCode

- String[20] (Required) - Default Organization Code for Group, Division, Organization and Tenant.

phone

List<string> (Required) - List of phone numbers to be checked for status (maximum of 1,000 mobile numbers).

 

Return Value

WSSubscribersStatusResponse
NameTypeDescription
Result bool True/False whether the call was successful or not.
ErrorCode int For Success/Failure it returns an error number
Message string Message related to error code.
Response List<SubscriberStatus>

SubscriberStatus object 
*Group - Subscriber subscription group. 

*Phone - Subscriber mobile number.

*CarrierID - Carrier Code of a subscriber mobile number.

*Carrier - Carrier Name of a subscriber mobile number.

*StatusID - StatusID of a subscriber mobile number

(0=Not a subscriber, 1=Active, 2=Inactive, 16=Underverification, 26=Block).

*Status - Status type of a subscriber mobile number.

*OptInMethodID - Opt in ID of a subscriber mobile number

(1=UI, 2=VBT / Widget, 3=Keyword, 4=FileUpload, 5=API).

*OptInMethod - Opt In Type of a subscriber mobile number. 

*OptInDate - First opt in of a subscriber mobile number. 

*LatestOptInOutDate - Last opt in or opt out date of a subscriber mobile number.

*UniqueID - UniqueID of the Subscriber

 

Remarks

WSSubscribersStatusResponse

 

Example

C#

 SubscriberClient subscriberService = new SubscriberClient("SubscriberWSServiceHttpEndpoint");
    string securityToken = txtToken.Text;
    string orgCode = txtOrgCode.Text;
    List<string> phone = new List<string>();
    string mobileNumber = txtMobileNo.Text;
    phone.Add(mobileNumber);
    
	WSSubscribersStatusResponse wSSubscribersStatusResponse = subscriberService.GetSubscribersStatus(securityToken, orgCode, phone.ToArray());

        if (!wSSubscribersStatusResponse.Result)
            {
                //handle error
                lblError.Text = wSSubscribersStatusResponse.Message;
            }
        else
            {
                //handle success
                lblError.Text = wSSubscribersStatusResponse.Message;
            }

SOAP

Soap Request
 
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/" xmlns:arr="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:GetSubscribersStatus>
         <!--Required:-->
         <ser:securityToken>Security Token</ser:securityToken>
         <!--Required:-->
         <ser:orgCode>Org code of Group, Division, Organization or Tenent</ser:orgCode>
         <!--Required:-->
         <ser:phone>
            <!--Zero or more repetitions:-->
            <arr:string>Mobile Number</arr:string>
         </ser:phone>
      </ser:GetSubscribersStatus>
   </soapenv:Body>
</soapenv:Envelope>

    
  Soap Response
  
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetSubscribersStatusResponse xmlns="http://SBTService/ServiceContracts/">
         <GetSubscribersStatusResult 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>1457</a:ErrorCode>
            <a:Message>Successfully retrieved subscriber status</a:Message>
            <a:Response>
               <a:SubscriberStatus z:Id="i2">
                  <a:Group>Group Name</a:Group>
                  <a:Phone>Phone Number</a:Phone>
                  <a:CarrierID>79</a:CarrierID>
                  <a:Carrier>T-Mobile</a:Carrier>
                  <a:StatusID>1</a:StatusID>
                  <a:Status>Active</a:Status>
                  <a:OptInMethodID>1</a:OptInMethodID>
                  <a:OptInMethod>UI</a:OptInMethod>
                  <a:OptInDate>6/26/2014 6:10:24 AM</a:OptInDate>
                  <a:LatestOptInOutDate>5/18/2016 6:30:52 AM</a:LatestOptInOutDate>
                  <a:UniqueID>TestUID</a:UniqueID>
               </a:SubscriberStatus>
            </a:Response>
         </GetSubscribersStatusResult>
      </GetSubscribersStatusResponse>
   </s:Body>
</s:Envelope>

PHP

<?php
    $client = new SoapClient("https://ui.solutionsbytext.com/Sbt.App.SetUp/wsservices/subscriberWSService.svc?wsdl");
    $param = array(
	'securityToken' => 'securityToken',
	'phone' => array('12345678901'),
	'orgCode' => 'orgCode'
);

$response = $client->__soapCall('GetSubscribersStatus', array($param));
echo '<pre/>';
print_r($response);
if($response->GetSubscribersStatusResult->Result){
	echo 'Message: '.$response->GetSubscribersStatusResult->Message;
}
else {
	echo 'Message: '.$response->GetSubscribersStatusResult->Message;
}

?>


REST

Method: GET

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/SubscriberRSService.svc/GetSubscribersStatus?securityToken=safdsfs&orgCode=dfsf&phone=["test","test123","test456"]

 

Sample C# Code:

var listOfPhones = new string[] { "test", "test123", "test456" };
                var ArrlistOfPhones = JsonConvert.SerializeObject(listOfPhones).ToString();                

                System.Net.WebClient webClientGet = new System.Net.WebClient();

                Uri getURi = new Uri("https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/SubscriberRSService.svc/GetSubscribersStatus?securityToken=" + "safdsfs" + "&orgCode=" + "dfsf" + "&phone=" + ArrlistOfPhones + "");
                txtRequestFormat.Text = getURi.ToString();

var GetSubscriberStatusResponse = webClientGet.DownloadString(getURi);

Note: “GetSubscriberStatusResponse” will be in JSON format.

 

Response:

The response will be in JSON format like below:

{" GetSubscribersStatusResult": {
   "Result": true,
   "ErrorCode": 1457,
   "Message": " Successfully retrieved subscriber status",
   “
}}


 

Send Feedback