1s2u.com API Integrations

Explore the power of seamless messaging with 1s2u.com API integrations. Enhance your system's capabilities by leveraging our APIs, designed for efficient and effective bulk SMS services. With 1s2u.com, experience reliable communication at your fingertips.

A reference for all features available to you via the HTTP interface for sending SMS.

With DLR you will be able to receive the status of sending your messages.

Customize and integrate all your website's monetary analysis into your system, or your Bulk SMS Panel.

Get your SMPP Bulk SMS Gateway with the SMPP API, or become Bulk SMS Provider.

We provide you with SMTP API to be used and integrated in your customized system.

Integrate the HLR API into your system.

Get the access and integerate the App Verification API into your system.

Description

Method [ POST, GET]

SMS API Parameters
Parametres Value Description
USERNAME Username Your account username
PASSWORD Password Your Account Password
MT 0 or 1 Message Type ( English = 0 , Arabic =1 , Unicode & Other Languages =1 )
SID Alphanumeric max 11 char Message Sender Name ( Max Length of 18 if Only Numeric , Max Length of 11 if Alpha numeric ) If you wish plus ('+') should be prefixed to the sender address when the message is displayed on the cell phone, please prefix the plus sign to your sender address while submitting the message (note the plus sign should be URL encoded). Additional restrictions on this field may be enforced by the SMSC
MNO Mobile number 10 to 18 digit Mobile Number to which to Send message to (Should not include a '+' sign or '00'), multiple mobile numbers can be separated by commas (note the comma (',') should be URL encoded) Max numbers can be submitted is 15 number per submission
MSG English or Unicode message text The content of the message intended for dispatch can encompass English in plain text or any other language in Unicode format, with a maximum message length spanning five parts. For extended or concatenated messages, every segment of 153 characters is accounted for as a singular message in plain text, while every 67 characters are regarded as a single message in Unicode. This is due to the system utilizing the remaining characters to encapsulate supplementary data required for the reassembly of the message on the mobile device.
Response messages from HTTP/HTTPS API
Status Response Values
Messages sent successfully. 3fd23425-6edb-4fec-ba91-8d70f5300fc0 Value returned as sms message id, It can be retained for generating DLR reports.
Message not sent. Error Code
Error Message Table
Error Codes Description
0000 Service is temporarily unavailable or down.
000 Please ensure all required parameters are filled in correctly.
00 Invalid username or password or trial account expired.
0020 Insufficient account credits to perform the operation.
0030 Invalid sender name.
0041 Invalid mobile number.
0042 Network is not supported/ activated.
0050 Invalid SMS text message.
0051 Invalid message type.
0066 Invalid submission limit.

The server only conducts the validations explicitly defined above. The client side must handle all other necessary checks for any additional parameters. For instance, the server doesn't validate the mobile number for characters outside of numerical values or adherence to the international format. In the scenario of Unicode messaging, if the message type parameter (mt) is incorrectly sent as 0 instead of 1, the message will be dispatched as plain text rather than Unicode. This happens because the server doesn't conduct any validation in this respect.

Code Sample
Imports System
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Text.RegularExpressions

Namespace Demo
    Public Module Program
        Public Sub Main(args() As String)
            'Your code goes here'


            Dim webClient As New System.Net.WebClient
            Dim result As String = webClient.DownloadString("https://api.1s2u.io/bulksms?username=xxxxxxx&password=xxxxxxxx&mt=0&Sid=Test&mno=61xxxxxxxx&msg=Message will be written here")
            Console.WriteLine(result)

        End Sub
    End Module
End Namespace
                                            
using System.Collections.Generic;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Web;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Threading;
using System;

namespace Demo
{
    public class Program
    {
        public static void Main(string[] args)
        {
            Stream update_objStream1 = Stream.Null, objStream1 = Stream.Null, objStream = Stream.Null;
            string sURL;
            sURL = "https://api.1s2u.io/bulksms?username=xxxxxxx&password=xxxxxxxx&mt=0&Sid=Test&mno=61xxxxxx&msg=Message will be written here";

            WebRequest wrGETURL;
            wrGETURL = WebRequest.Create(sURL);

            WebProxy myProxy = new WebProxy("myproxy", 80);
            myProxy.BypassProxyOnLocal = true;

            try { objStream = wrGETURL.GetResponse().GetResponseStream(); }
            catch (Exception ex)
            {
                // handle exception here

            }
            StreamReader objReader = new StreamReader(objStream);
            string messageId = objReader.ReadLine(); //final message id from stream object
            Console.WriteLine(messageId);

            //note: once done please all connctions.
            //objReader.Close();     
        }
    }
}
                                            
/*
/*
* Requirements: your PHP installation needs cUrl support, which not all PHP installations
* include by default.
*
* Substitute your own username, password, mno, Sid, fl, mt, and message in seven_bit_msg
*then run the code:
*/
$username = 'username';
$password = 'password';
$mt = '0';
$fl = '0';
$seven_bit_msg = "Message will be written here";
/*
* Your phone number, including country code, i.e. 60123456756:
*/
$mno = 'Receiver phone number';
$Sid = 'test';
/*
* 
*/
$url = 'https://api.1s2u.io/bulksms';
$post_fields = array(
    'username' => $username,
    'password' => $password,
    'mt' => $mt,
    'Sid' => $Sid,
    'mno' => $mno,
    'msg' => $seven_bit_msg
);
$get_url = $url . "?" . http_build_query($post_fields);
/*
* A 7-bit GSM SMS message can contain up to 160 characters (longer messages can be
* achieved using concatenation).
*
* All non-alphanumeric 7-bit GSM characters are included in this example. Note that Greek characters,
* and extended GSM characters (e.g. the caret "^"), may not be supported
* to all networks. Please let us know if you require support for any characters that
* do not appear to work to your network.
*/
/*
* Sending 7-bit message
*/
$post_body = seven_bit_sms( $username, $password, $seven_bit_msg, $mno, $Sid, $fl, $mt);
$result = send_message( $post_body, $get_url );
if( $result['success'] ) {
    print_ln( formatted_server_response( $result ) );
}
else {
    print_ln( formatted_server_response( $result ) );
}
/*
* If you don't see this, and no errors appeared to screen, you should
* check your Web server's error logs for error output:
*/
print_ln("Script completely ran.");
function print_ln($content) {
    if (isset($_SERVER["SERVER_NAME"])) {
    print $content."";
    }
    else {
    print $content."\n";
    }
}
function formatted_server_response( $result ) {
    $this_result = "";
    if ($result['success']) {
    $this_result .= "Success ID : ".$result['id'];
    }
    else {
    $this_result .= "Fatal error: HTTP status " .$result['http_status_code']. ", API status " .$result['api_status_code']. " Full details " .$result['details'];
    }
    return $this_result;
}
function send_message ( $post_body, $get_url ) {
    $ch = curl_init( );
    curl_setopt ( $ch, CURLOPT_URL, $get_url );
    curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
    // Allowing cUrl funtions 20 second to execute
    curl_setopt ( $ch, CURLOPT_TIMEOUT, 20 );
    // Waiting 20 seconds while trying to connect
    curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 20 );
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $response_string = curl_exec( $ch );
    $curl_info = curl_getinfo( $ch );
    $sms_result = array();
    $sms_result['success'] = 0;
    $sms_result['details'] = '';
    $sms_result['http_status_code'] = $curl_info['http_code'];
    $sms_result['api_status_code'] = '';
    $sms_result['id'] = $response_string;
    if ( $response_string == FALSE ) {
    $sms_result['details'] .= "cURL error: " . curl_error( $ch ) . "\n";
    } elseif ( $curl_info[ 'http_code' ] != 200 ) {
    $sms_result['details'] .= "Error: non-200 HTTP status code: " . $curl_info[ 'http_code' ] . "\n";
    }
    else {
    $sms_result['details'] .= "Response from server: $response_string\n";
    $api_result = substr($response_string, 0, 2);
    $status_code = $api_result;
    $sms_result['api_status_code'] = $status_code;
    if ( $api_result != 'OK' ) {
        $sms_result['details'] .= "Error: could not parse valid return data from server.\n" . $api_result;
    } else {
        if ($status_code == 'OK') {
        $sms_result['success'] = 1;
        }
    }
    }
    curl_close( $ch );
    return $sms_result;
}
function seven_bit_sms ( $username, $password, $message, $mno, $sid, $fl, $mt) {
    $post_fields = array (
    'username' => $username,
    'password' => $password,
    'mno'   => $mno,
    'sid' => $sid,
    'sfl' => $fl,
    'mt' => $mt,
    'message'  => $message
    );
    return make_post_body($post_fields);
}
function make_post_body($post_fields) {
    $stop_dup_id = make_stop_dup_id();
    if ($stop_dup_id > 0) {
    $post_fields['stop_dup_id'] = make_stop_dup_id();
    }
    $post_body = '';
    foreach( $post_fields as $key => $value ) {
    $post_body .= urlencode( $key ).'='.urlencode( $value ).'&';
    }
    $post_body = rtrim( $post_body,'&' );
    return $post_body;
}
function make_stop_dup_id() {
    return 0;
}
                                            
Description

Method [POST]

DLR API Body Payload
Body content Value Description
msisdn msisdn The number to which the SMS was sent.
source source Sender Id/From clause in the SMS message.
sms_id sms_id A unique ID for the message
sent_date sent_date The received status date and time.
response response The status of the message. Possible statuses include, 'DELIVRD', 'UNDELIV' , 'EXPIRED'.
DLR Response Codes

Upon successful addition of your Webhook URL into our system, you will start receiving real-time Delivery Reports (DLR) at your end. In response to certain event triggers, our SMS system will transmit the data back to your designated Webhook URL; such requests are commonly referred to as Webhooks or status callbacks. Consequently, you are able to archive the post-back body content into your database or file for further analysis and processing.

Description
https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword
Overview
SMS API Parameters
Parametres Value Description
USER user Your account username
PASS pass Your account password or if you have set a dedicated password for your API.
Response messages from Get Credits API
Return Values Description
00 Invalid username or password
0 or your account remaining balance remaining balance
Description
Overview
Authentication
Capabilities & Limitations
SMPP API Parameters
Parametres Value Description
Host smpp.1s2u.io You can connect to our SMPP host with your given username and password
Port 2779 Make sure to whitelist our SMPP port at your server side
USERNAME Username Your account username
PASSWORD Password Your Account Password
  1. If the sender address is alphanumeric or non-numeric, TON is set to 5, and NPI is set to 0.
  2. If the sender address is a short code, TON is set to 3, and NPI is set to 0.
  3. If the sender starts with a "+" symbol, TON is set to 1, and NPI is set to 1.
  4. If the recipient starts with a "+" symbol, TON is set to 1, and NPI is set to 1.
  5. For all other cases, TON is set to 0, and NPI is set to 1.
Description
Description
  • The current activity status of the mobile number within a network.
  • The roaming status of the mobile number.
  • Whether the number has been transferred to a different network.
  • The destination network to which the phone number has migrated.
  • Recent usage status of the mobile.
  • The last country where the mobile was utilized.
  • Validity of the mobile number.
  • Associated country code of the number.
  • The returned query information also includes the IMSI, MSC, MCC, and MNC.
  • Indications of any temporary errors that might obstruct message delivery.

Method [ POST, GET]

https://api.1s2u.io/hlr?username=your_username&password=your_password&msisdn=12345678900
HLR API Parameters
Parametres Value Description
MSISDN 12345678900 The number to check.
username your_username Your account username.
Password your_password Your account password or your API dedicated password (if you set at your account settings).
API Error Codes:
Error Text Description
MSISDN value format is incorrect. Invalid MSISDN. This means the parameter was not provided or left blank.
Invalid Password Parameter Invalid password. This means the parameter was not provided or left blank.
Username input is not valid. Invalid username. This means the parameter was not provided or left blank.
HLR credentials are incorrect. Invalid username or password, or account not active or exists.
Insufficient hlr credits. Insufficient HLR Credits, your account does not have enough HLR credits to proceed with the request.
Http Error Code: 429 API calls quota exceeded! maximum admitted 30 per 1s/.
Response Details:
                                    
{
"12345678900": {
"msisdn": "12345678900",
"country": "United States of America",
"err_desc": "Live",
"operator": "First Communications",
"type": "VoIP",
"mccmnc": "",
"roaming": "False",
"err_code": "0",
"status": "Delivered",
"ported": "True"
}
}
                                    
                                    
Err code:
  1. 000 DELIVRD
  2. 001 UNDELIV Temporarily
  3. 002 UNDELIV Permanent
  4. 003 REJECTD Temporarily
  5. 004 REJECTD Permanent
Response nodes description:
Sr. No. Node Name Description
1. MSISDN MSISDN for number lookup
2. country Ported country name if number is ported else original country name
3. operator Ported operator name in case of number is ported else original operator name
4. mccmnc Mobile Country Code and Mobile Network Code
5. err_code
6. status
Further info, please refer to the table below.
8. err_desc Please refer the table below.
9. type The type of the checked number, mobile, voip, landline ...etc
10. roaming To get if the checked number in Roaming state.
Error Code types and descriptions:
Error Description Error Code Permanent
Absent Subscriber 001 false
Call Barred 001 false
Data Missing 001 false
SMS Facility Not Supported 001 false
HLR Abort 001 false
No Response 001 false
Reject Request 001 false
No Error 001 false
MSISDN Not Found 001 false
Invalid MSISDN 001 false
Request Method Not Allowed 001 false
Request Throttled 001 false
Invalid URL 001 false
System Failure 001 false
SMS Tele Service Not Provisioned 002 true
Time Out 001 false
Unexpected Data Value 001 false
Unknown Subscriber 002 true
Service Failure 003 false
CUG Reject 001 false
SMS Facility Not Supported 001 false
System Failure 001 false
Data Missing 001 false
Unexpected Data Value 001 false
Service Unreachable 003 false
Authentication Error 001 false
Not allowed to use this profile 001 false
Not allowed to use this service 001 false
Unknown user 001 false
Description
Overview
http://www.smscin.com/do.php
App Verification API Parameters
Parametres Value Description
USERNAME Username you username in our system,like xxx@gmail.com
token token show at First Page you login, like 9ac2d96d7134bdfe61cba4724e174423
pid pid found at project list which you want use.
mobile mobile the mobile number you get, like 8615113875319
Steps for passing the parameters:

Related Articles

We are using cookies

This website is using cookies to enhance your browsing experience.