SMS API (3.0)
Method | API URL |
---|---|
[Get, Post] | https://api.1s2u.io/bulksms?username=YourUsername&password=YourPassword&mt=MessageType&sid=SenderName&mno=MobileNumber&msg=Message |
SMS API Parameters
Parametres | Description |
---|---|
Username | Your 1s2u account username |
Password | Your 1s2u account password |
MT | Message Type ( English = 0, Unicode =1 and for messages in languages other than English =1 ) |
SID |
Sender Name When specifying the sender name for your messages, please adhere to the following guidelines to ensure optimal display and compliance: Character Limit: The maximum length of the sender name is 15 characters if it consists solely of numeric characters. If the sender name includes both alphabetic and numeric characters, the maximum length is 11 characters. Prefixing with '+': If you desire the sender address to be displayed with a plus sign ('+') on recipients' cell phones, please ensure that you prefix the plus sign to your sender address while submitting the message. It's important to note that the plus sign should be URL encoded for proper transmission. SMSC Restrictions: It's important to be aware that additional restrictions on the sender name field may be enforced by the Short Message Service Center (SMSC). These restrictions may vary, and it's advisable to ensure compliance with any applicable regulations or guidelines set forth by the SMSC. |
MNO |
Recipient Mobile Numbers: Streamlined Delivery for Effective Messaging. To ensure seamless message delivery, please adhere to the following guidelines when specifying the mobile numbers of your recipients: Format:>When entering the mobile numbers, do not include a plus sign ('+') or '00' prefix. Please provide the numbers in their standard format, without any additional symbols or characters. Multiple Numbers: If you need to send the message to multiple recipients, you can include multiple mobile numbers separated by commas. Submission Limit: For each message submission, you can include a maximum of 30 mobile numbers. This limit helps maintain optimal performance and ensures efficient processing of your messaging requests. |
MSG |
Message Content: Ensuring Optimal Length and Concatenation for Effective Delivery When composing your message, please keep the following details in mind to ensure optimal length and proper handling: Message Types: The message content can be in English as plain text or in any other language encoded as Unicode. This allows for a wide range of language options to cater to your messaging needs. Maximum Message Length: The maximum length of a message is 5 parts. However, please note that the exact character limit may vary based on specific requirements and restrictions. Concatenated (Long) Messages: In the case of concatenated or long messages, the system counts every 153 characters as one message for plain text and 67 characters for Unicode. The remaining characters are reserved by the system to pack additional information required for reassembling the message on the recipient's cell phone. |
HTTP Response: Providing Status and Error Information
Status Codes
-
Send Single SMS:https://api.1s2u.io/bulksms?username=YourUsername&password=YourPassword&mt=0&sid=SenderName&mno=MobileNumber&msg=Message
-
Send Bulk SMS:https://api.1s2u.io/bulksms?username=YourUsername&password=YourPassword&mt=0&sid=SenderName&mno=61111111111111,61111111111111,61111111111111,61111111111111&msg=Message
-
Send Unicode SMS:https://api.1s2u.io/bulksms?username=YourUsername&password=YourPassword&mt=1&sid=SenderName&mno=61111111111111&msg=627062D00200641064A0020062E062F0645062900200631063306270626064400200627064406
-
Rate Limit:
Error Codes
Code | 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. |
0060 | Invalid submission limit. |
using System.Collections.Generic;
// No more boilerplate needed with top level statements
(https://docs.microsoft.com/en-us/dotnet/core/tutorials/top-level-templates)
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.1s2u.io/bulksms");
request.Headers.Add("Cookie", "ASPSESSIONIDACTQTSTS=GEAEKPFCNECDACOHHKHDONEB;
ASPSESSIONIDCATTSSST=HFAGPIFCMLKJADCMIOHCLBKD");
var collection = new List>();
collection.Add(new("username", "username"));
collection.Add(new("password", "password"));
collection.Add(new("mno", "6111111111111"));
collection.Add(new("sid", "test"));
collection.Add(new("msg", "Hello World"));
collection.Add(new("mt", "0"));
var content = new FormUrlEncodedContent(collection);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
$client = new Client();
$headers = [
'Content-Type' => 'application/x-www-form-urlencoded',
'Cookie' => 'ASPSESSIONIDACTQTSTS=GEAEKPFCNECDACOHHKHDONEB; ASPSESSIONIDCATTSSST=HFAGPIFCMLKJADCMIOHCLBKD'
];
$options = [
'form_params' => [
'username' => 'username',
'password' => 'password',
'mno' => '6111111111111',
'sid' => 'test',
'msg' => 'Hello World',
'mt' => '0'
]];
$request = new Request('POST', 'https://api.1s2u.io/bulksms', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "username=username&password=password&mno=6111111111111&sid=test&msg=Hello World&mt=0");
Request request = new Request.Builder()
.url("https://api.1s2u.io/bulksms")
.method("POST", body)
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Cookie", "ASPSESSIONIDACTQTSTS=GEAEKPFCNECDACOHHKHDONEB; ASPSESSIONIDCATTSSST=HFAGPIFCMLKJADCMIOHCLBKD")
.build();
Response response = client.newCall(request).execute();
import requests
url = "https://api.1s2u.io/bulksms"
payload = 'username=username&password=password&mno=6111111111111&sid=test&msg=Hello%20World&mt=0'
headers = {
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': 'ASPSESSIONIDACTQTSTS=GEAEKPFCNECDACOHHKHDONEB; ASPSESSIONIDCATTSSST=HFAGPIFCMLKJADCMIOHCLBKD'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)