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

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 URLs based on input Long URLs and domain configured at SBT side.

Note: In one request maximum 100 Short URLs can be generated.

 

Syntax

C#

[OperationContractAttribute()] 
SBT.API.DataContracts.Admin.WSShortURLsMappingResponse GetShortURLs(
string securityToken, 
List<string> longURLs, 
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

longURLs

- String[50] (Required) – Long URL which needs to be Shorten. Multiple Long URLs can be entered as array. Limited to 100 Long URLs.

orgCode

- String[20] (Required) - Organization Code for the group, division, organization.

Domain

- String[20] (Optional) – Domain to which Short URL to be generated

 

Return Value

WSGetShortURLsResponse

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 the Error code.

Response

<a:ShortURLMapping>

List of Response parameters, These will be displayed repeatedly based on number of input Long URLs.

LongURL- Long URL passed in request to get Short URL.

ShortURL - Short URL generated based on Long URL and domain passed in request.

 

Example
C#

lblError.Text = "";
SmartClickClient smartClickResult = new SmartClickClient("SmartClickWSServiceHttpEndpoint");
string securityToken = txtToken.Text;
string orgCode = txtOrgCode.Text;
List<string> longURLs = new List<string>() { longURL1, longURL2 };
string domain = txtDomain.Text;
WSShortURLsMappingResponse wSResponse = smartClickResult.GetShortURLs(securityToken, longURLs, string orgCode, string domain);
if (!wSResponse.Result)
{
//handle error
lblError.Text = wSResponse.Message; 
}
else
{
//handle success
lblError.Text = wSResponse.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:GetShortURLs>
<!--Required:-->
<ser:securityToken>Security Token</ser:securityToken>
<!--Required:-->
<ser:longURLs>
<!--Zero or more repetitions:-->
<arr:string>http://www.LURL01.com</arr:string>
<arr:string>http://www.LURL02.com</arr:string>
</ser:longURLs>
<!--Required:-->
<ser:orgCode>Organization Code</ser:orgCode>
<!--Optional:-->
<ser:domain>Valid Domain name</ser:domain>
</ser:GetShortURLs>
</soapenv:Body>
</soapenv:Envelope> 

Soap Response
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<GetShortURLsResponse xmlns="http://SBTService/ServiceContracts/">
<GetShortURLsResult 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:ShortURLMapping>
<a:LongURL>http://www.LURL01.com</a:LongURL>
<a:ShortURL>sclk.me/2K2DQJ2</a:ShortURL>
</a:ShortURLMapping>
<a:ShortURLMapping>
<a:LongURL>http://www.LURL02.com</a:LongURL>
<a:ShortURL>sclk.me/2K7U5EH</a:ShortURL>
</a:ShortURLMapping>
</a:Response>
</GetShortURLsResult>
</GetShortURLsResponse>
</s:Body>
</s:Envelope>

REST
Method: GET
URL: https://ui.solutionsbytext.com/SBT.App.SetUp/RSServices/SmartClickRSService.svc/GetShortURLs?securityToken=SecurityToken&longURLs=http://www.test.com,http://www.test2.com&orgCode=OrgCode&domain=Sclk.me

Response:

The response will be in JSON format as below:

{
"GetShortURLsResult": {
"Result": true,
"ErrorCode": 1528,
"Message": "Successfully generated the shortURL.",
"Response": [
{
"LongURL": " http://www.test.com",
"ShortURL": "sclk.me/2JEJ8Kq"
},
{
"LongURL": " http://www.test2.com",
"ShortURL": "sclk.me/2JEAPOC"
}
]
}
}