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

Returns the Short URL based on input Long URL and domain configured at SBT side.

 

Syntax

C#

[OperationContractAttribute()]
SBT.API.DataContracts.Admin.WSShortURLMappingResponse GetShortURL(
String securityToken, 
string longURL, 
string orgCode, 
string domain
);

 

 

WSDL


Production: https://ui.solutionsbytext.com/SBT.App.SetUp/wsservices/SmartclickWSService.svc?singlewsdl

Staging: https://test.solutionsbytext.com/SBT.App.SetUp/wsservices/SmartclickWSService.svc?singlewsdl

 

 

Parameters

securityToken

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

longURL

- String[200] (Required) – URL needs to be Shorten.

orgCode

- String[20] (Required) - Organization Code for the group, division, organization. OrgCode is a required field for software partner but not for Tenant customer type.

Domain

- String[20] (Optional) – Domain to which Short URL to be generated. If no domain passed, then it will take the default domain.

 

Return Value

WSGetShortURLResponse
NameTypeDescription
Result bool True/False wether the cell was successful or not.
ErrorCode int For Success/Failure it returns an error number.
Message string Message related to error code.
Response  

List of Response parameters,

LongURL- Long URL passed in request to get Short URL.
ShortURL - Short URL generated based on Long URL and domain passed in request.
DisplayMessage – This parameter will be displayed only in case of errors. For.eg. Invalid domain etc.

 

Example

C#

lblError.Text = "";
SmartClickClient smartClickResult = new SmartClickClient("SmartClickWSServiceHttpEndpoint");
	string securityToken = txtToken.Text;
	string longURL = txtLongURL.Text;
	string orgCode = txtOrgCode.Text;
	string domain = txtDomain.Text;
 
WSShortURLMappingResponse wSShortURLMappingResponse = smartClickResult.GetShortURL(securityToken, longURL, orgCode, domain);
        if (!wSShortURLMappingResponse.Result)
            {
                //handle error
                lblError.Text = wSShortURLMappingResponse.Message;                
            }
        else
            {
                //handle success
                lblError.Text = wSShortURLMappingResponse.Message;
            }

SOAP

Soap Request 
  
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://SBTService/ServiceContracts/">
   <soapenv:Header/>
   <soapenv:Body>
      <ser:GetShortURL>
         <!-- Required:-->
         <ser:securityToken>Security Token </ser:securityToken>
         <!-- Required:-->
         <ser:longURL>http://www.test.com</ser:longURL>
         <!-- Required:-->
         <ser:orgCode>Org Code</ser:orgCode>
         <!--Optional:-->
         <ser:domain>domain</ser:domain>
      </ser:GetShortURL>
   </soapenv:Body>
</soapenv:Envelope>
 
             
Soap Response
              
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetShortURLResponse xmlns="http://SBTService/ServiceContracts/">
         <GetShortURLResult xmlns:a="http://SBTAPIService/DataContract/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:Result>true</a:Result>
            <a:ErrorCode>1528</a:ErrorCode>
            <a:Message>Successfully generated the shortURL.</a:Message>
            <a:Response>
               <a:LongURL>http://www.test.com</a:LongURL>
               <a:ShortURL>Sclk.me/2jjhYNv</a:ShortURL>
            </a:Response>
         </GetShortURLResult>
      </GetShortURLResponse>
   </s:Body>
</s:Envelope>

 

Rest

Method: GET

URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/SmartClickRSService.svc/GetShortURL?securityToken=SecurityToken&longURL=http://www.test.com&orgCode=OrgCode&domain=Sclk.me

Response: 

The response will be in JSON format like below:
 
{
    "GetShortURLResult": {
        "Result": true,
        "ErrorCode": 1528,
        "Message": "Successfully generated the shortURL.",
        "Response": {
            "LongURL": "http://www.test.com",
            "ShortURL": "Sclk.me/2A7jNp4"
        }
    }
}

 

Send Feedback