SMS API (3.0)


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


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)
                                                    

SMPP v3.4


SMPP Connection

Parametres Description
Host smpp.1s2u.io
Port 2779
SSL Port 2777
Username Your 1s2u account username
Password Your 1s2u account password
Sessions 2 sessions, in TX / RX / TRX mode

Get account credits


Parameters

Parametres Description
User Your 1s2u account username
Pass Your 1s2u account password

Response:

API Rate Limit: Ensuring Optimal Service with 1s2u

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword");
request.Headers.Add("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                        
                                                    

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
    'Cookie: ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                        
                                                    

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword")
.method("GET", body)
.addHeader("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC")
.build();
Response response = client.newCall(request).execute();
                                                    

import requests

url = "https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword"

payload = {}
headers = {
    'Cookie': 'ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)                           
                                                    

Delivery Reports Http callback


Parameters
Post Data Description
msisdn The number to which the SMS was sent.
source Sender Id/From clause in the SMS message.
sms_id A unique ID for the message
sent_date The received status date and time
response The status of the message. Possible statuses include, 'DELIVRD', 'UNDELIV' , 'EXPIRED'

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "http://www.yourdomain.com/dlr_url.php");
var content = new MultipartFormDataContent();
content.Add(new StringContent(""), "msisdn");
content.Add(new StringContent(""), "source");
content.Add(new StringContent(""), "sms_id");
content.Add(new StringContent(""), "sent_date");
content.Add(new StringContent(""), "response");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                     
                                                    

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'http://www.yourdomain.com/dlr_url.php',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('msisdn' => '','source' => '','sms_id' => '','sent_date' => '','response' => ''),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                                    

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("msisdn","")
.addFormDataPart("source","")
.addFormDataPart("sms_id","")
.addFormDataPart("sent_date","")
.addFormDataPart("response","")
.build();
Request request = new Request.Builder()
.url("http://www.yourdomain.com/dlr_url.php")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
                                                    

import requests

url = "http://www.yourdomain.com/dlr_url.php"

payload = {'msisdn': '',
'source': '',
'sms_id': '',
'sent_date': '',
'response': ''}
files=[

]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                   
                                                    

HLR Lookup


Parameters

Method API URL
[Get, Post] https://api.1s2u.io/hlr
Parametres Description
msisdn The number to check.
username Your account username
password Your account password or your API dedicated password (if you set at your account settings)

Example:
https://api.1s2u.io/hlr?username=your_username&password=your_password&msisdn=12345678900
Output:

{
    "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"
    }
}
                                                
Sample for a bulk HLR lookup (up to 30 numbers per request).
https://api.1s2u.io/hlr?username=your_username&password=your_password&msisdn=12345678900,12345678900
Output:

{
    "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"
    },
    "12345678901": {
        "msisdn": "12345678901",
        "country": "United States of America",
        "err_desc": "Live",
        "operator": "First Communications",
        "type": "VoIP",
        "mccmnc": "",
        "roaming": "False",
        "err_code": "0",
        "status": "Delivered",
        "ported": "True"
    }
}
                                                

Lookup Response Result
value Description
msisdn Subscriber msisdn to check.
country The Subscriber network country.
err_desc If have error otherwise will Show Live if the number active. error description can beon of the folowing:

Live

Dead

Inconclusive

No Teleservice Provisioned

Absent Subscriber

operator the Subscriber mobile network operator.
type number type like Mobile,Fixed.
mccmnc actual MCC and MNC of a subscriber.
roaming if the subscriber number currently roaming.
error_code anything marked as Live in error_desc will always be Error Code 1, error code can be on of the folowing:

0=Active mobile number

1=Number decommissioned by the owning network

5=We are unable to retrieve a response from the network for this numb

11=This number is not able to receive calls or SMS messages. This is usually a number relating to a data SIM

27=There are a number of ways a number can be returned as Absent Subscriber Please see our Absent Subscriber information page for further details.

status number status.

error_code, error_desc and Status are all linked and you can use any of these fields.status can be one of the folowing state:

Delivered

Undelivered


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/.

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.1s2u.io/hlr");
request.Headers.Add("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC");
var content = new MultipartFormDataContent();
content.Add(new StringContent(""), "msisdn");
content.Add(new StringContent(""), "username");
content.Add(new StringContent(""), "password");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                                                             
                                                    

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.1s2u.io/hlr',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('msisdn' => '','username' => '','password' => ''),
    CURLOPT_HTTPHEADER => array(
    'Cookie: ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;                                            
                                                    

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("msisdn","")
.addFormDataPart("username","")
.addFormDataPart("password","")
.build();
Request request = new Request.Builder()
.url("https://api.1s2u.io/hlr")
.method("POST", body)
.addHeader("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC")
.build();
Response response = client.newCall(request).execute();
                                                    

import requests

url = "https://api.1s2u.io/hlr"

payload = {'msisdn': '',
'username': '',
'password': ''}
files=[

]
headers = {
    'Cookie': 'ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                             
                                                    

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)
                                        
1s2u.com logo
SMPP v3.4 1s2u.com API

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, "https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword");
request.Headers.Add("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC");
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                        
                                        

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => array(
    'Cookie: ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                            
                                        

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword")
.method("GET", body)
.addHeader("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC")
.build();
Response response = client.newCall(request).execute();
                                        

import requests

url = "https://api.1s2u.io/checkbalance?user=yourusername&pass=yourpassword"

payload = {}
headers = {
    'Cookie': 'ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)                           
                                        

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "http://www.yourdomain.com/dlr_url.php");
var content = new MultipartFormDataContent();
content.Add(new StringContent(""), "msisdn");
content.Add(new StringContent(""), "source");
content.Add(new StringContent(""), "sms_id");
content.Add(new StringContent(""), "sent_date");
content.Add(new StringContent(""), "response");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                     
                                        

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'http://www.yourdomain.com/dlr_url.php',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('msisdn' => '','source' => '','sms_id' => '','sent_date' => '','response' => ''),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                        

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("msisdn","")
.addFormDataPart("source","")
.addFormDataPart("sms_id","")
.addFormDataPart("sent_date","")
.addFormDataPart("response","")
.build();
Request request = new Request.Builder()
.url("http://www.yourdomain.com/dlr_url.php")
.method("POST", body)
.build();
Response response = client.newCall(request).execute();
                                        

import requests

url = "http://www.yourdomain.com/dlr_url.php"

payload = {'msisdn': '',
'source': '',
'sms_id': '',
'sent_date': '',
'response': ''}
files=[

]
headers = {}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                   
                                        

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.1s2u.io/hlr");
request.Headers.Add("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC");
var content = new MultipartFormDataContent();
content.Add(new StringContent(""), "msisdn");
content.Add(new StringContent(""), "username");
content.Add(new StringContent(""), "password");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());                                                                             
                                        

$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://api.1s2u.io/hlr',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS => array('msisdn' => '','username' => '','password' => ''),
    CURLOPT_HTTPHEADER => array(
    'Cookie: ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;                                            
                                        

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
.addFormDataPart("msisdn","")
.addFormDataPart("username","")
.addFormDataPart("password","")
.build();
Request request = new Request.Builder()
.url("https://api.1s2u.io/hlr")
.method("POST", body)
.addHeader("Cookie", "ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC")
.build();
Response response = client.newCall(request).execute();
                                        

import requests

url = "https://api.1s2u.io/hlr"

payload = {'msisdn': '',
'username': '',
'password': ''}
files=[

]
headers = {
    'Cookie': 'ASPSESSIONIDCCASRDTS=OINFCNGDBFEDOBMIODKMEJGC'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)                                                                                                             
                                        

© Copyright 1s2u.com .

We are using cookies

This website is using cookies to enhance your browsing experience.