User Guide HTTP (GET POST)

User Guide HTTP (GET POST)

<p> Api Slmsms.com</p><p>User Guide HTTP – (GET – POST)</p><p>HTTP Connectivity This document covers the HTTP method of connectivity. This is one of the simpler server‐based forms of communication to with our gateway. It can be used either in the form of a HTTP POST or as an URL. We recommend POST for larger data transfer, due to the size limitation of GET. Communication to our API can be done via HTTP on port 80. All calls to the API must be URL‐encoded. The beauty and add‐on advantage of http co‐nn ectivity‐ is that you can check or access the gateway even on web based applications. The parameter names are case‐sensitive, so it is important to read entire document prior to seeking assistance from slmsms.</p><p>1 HTTP GET‐ </p><p>HTTP URLS Unicode: URL for Single SMS</p><p> ht t p : // www .slmsms .c om /ht t p Sms P r ovi d er.a s p x ? user n am e = u ser& p ass w o r d = p ass & m o b il e = 9 6 6 5 0 0 0 0 0 0 0 0& u n i c o d e = U & messag e = 0 6 3 9 0 6 2 8 0 6 2 F 0 0 2 0 0 6 2 7 0 6 4 4 0 6 3 3 0 6 4 5 0 6 4 0 6 3 9 & s e n d er = slmsms </p><p>URL for Multiple SMS</p><p> ht t p : // www .slmsms .c om /ht t p Sms P r ovi d er.a s p x ? user n am e = u ser& p ass w o r d = p ass & m o b il e = 9 6 6 5 0 0 0 0 0 0 0 0 , 9 6 6 5 0 0 0 0 0 0 0 1& u n i c o d e = U & m essage = 0 6 3 9 0 6 2 8 0 6 2 F 0 0 2 0 0 6 2 7 0 6 4 4 0 6 3 3 0 6 4 5 0 6 4 0 6 ‐ 3 9&s e nd e r = slmsms </p><p>In this URL for sending on multiple mobile you have to separate with comma(,)</p><p>HTTP URLS English: URL for Single SMS</p><p> ht t p : // www .slmsms .c om /ht t p Sms P r ovi d er.a s p x ? us e r n am e = u ser& p ass w o r d = p ass & m o b il e = 9 6 6 5 0 0 0 0 0 0 0 0& u n i c o d e = E&m e ssage = h i& s e nd er = slmsms </p><p>URL for Multiple SMS 0544884425/[email protected] Api Slmsms.com ht t p : // www .slmsms .c om /ht t p Sms P r ovi d er.a s p x ? user n am e = u ser& p ass w o r d = p ass & m o b il e = 9 6 6 5 0 0 0 0 0 0 0 0 , 9 6 6 5 0 0 0 0 0 0 0 1& u n i c o d e = E& m essage =t e s t & s e n d er = slmsms </p><p>0544884425/[email protected] Api Slmsms.com</p><p>In this URL for sending on multiple mobile you have to separate with comma(,)</p><p>HTTP Parameters</p><p>Username: This is your account username given by slmsms Password: this is password of your account</p><p>Mobile: This is recipient mobile number. Format should be like 966500000000 Unicode: This is the code which represents type of message. The values will be E for English, U for Unicode.</p><p>Message: Actual message. If this English it will be English. For sending Unicode, you need to convert into hexacode.</p><p>Sender: This is sender address. This can be only in English and only up to 11characters.</p><p>‐</p><p>2 HTTP – POST Dim username As String = ""</p><p>Dim password As String = "" Dim result As String = "" Dim strPost As String = "" Dim strbuld As New StringBuilder strbuld.Append("username=" & username & "&password=" & password & "&mobile=") strbuld.Append(numbers) ' the unicode parameter is equal to ‘e’ for englsih and ‘u’ for arabic strbuld.Append("&unicode=e&message=") ' the messageText is unicoded for arabic if not its plain text strbuld.Append(messageText) strbuld.Append("&sender=" & sender) strPost = strbuld.ToString Dim myWriter As StreamWriter = Nothing Dim url As String = " h t t p : // www . slmsms. c om / H tt p S M S P r o v i d er.as p x" Dim objRequest As HttpWebRequest = WebRequest.Create(url) objRequest.Method = "POST" 0544884425/[email protected] Api Slmsms.com objRequest.ContentLength = strPost.Length objRequest.ContentType = "application/x‐www‐form‐urlencoded" Try myWriter = New StreamWriter(objRequest.GetRequestStream()) myWriter.Write(strPost) Catch x As Exception</p><p>0544884425/[email protected] Api Slmsms.com</p><p>Finally If myWriter IsNot Nothing Then myWriter.Close() End If End Try Dim objResponse As HttpWebResponse = objRequest.GetResponse() Dim sr As StreamReader sr = New StreamReader(objResponse.GetResponseStream()) result = sr.ReadToEnd() sr.Close()</p><p>Error Codes 0 : Success 101 : Parameter are missing 104 : either user name or password are missing or your Account is on hold 105 : Credit are not available 106 : wrong Unicode 107 : blocked sender name 108 : missing sender name 109 : Forbidden word 1010 : Wrong SMS content format or URL format is not correct or Mobile number is blocked 1011 : Username is missing 1012 : Password is missing 1013 : Mobile number is missing 1014 : Unicode type is missing 1015 : SMS content is empty 1016 : Sender name is empty</p><p>History</p><p>This part of URL deals with the messages history and that includes the messages delivered and outstanding. The beauty and add‐on advantage of http connectivity is that you can check or access the gateway even on web based applications. Login to h ttp :// www.slmsms.com to history. You can check whether messages are delivered or outstanding.</p><p>SMS Specifications </p><p>Unicode:</p><p>Single Message: A message in Unicode format can contain up to 70 characters</p><p>0544884425/[email protected] Api Slmsms.com</p><p>Multiple Messages: Once the message exceeds more than 70 characters it would be sent in multiples with 67 characters in each message.</p><p>English:</p><p>Single Message: A message in English format can contain up to 160 characters. Multiple Messages: Once the message exceeds more than 160 characters it would be sent in multiples with 134 characters in each message.</p><p>0544884425/[email protected]</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    6 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us