|
Key
|
Value
|
Description
|
|---|---|---|
|
sender_id
|
OBLIGR
|
REQUIRED - 6 Character.
|
|
message (string)
|
THIS IS A TEST MESSAGE
|
REQUIRED
|
|
mobile_no (string)
|
8225838383
|
REQUIRED -comma separate multiple mobile no
|
|
schedule_date_time (datetime)
|
2020-05-20 13:44:43
|
User posting_time for Schedule SMS. Format : 'Y-m-d H:i:s'
|
|
unicode (boolean)
|
0
|
1 or 0 Unicode 1 SMS Count = 70 Characters
|
curl --location --request POST 'https://obligr.io/api_v2/message/send' \ --header 'Authorization: Bearer [YOUR_API_KEY]' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Cookie: [COOKIES]' \ --data-urlencode 'sender_id=OBLIGR' \ --data-urlencode 'message=THIS IS A TEST MESSAGE' \ --data-urlencode 'mobile_no=8225838383' \ --data-urlencode 'unicode=0
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://obligr.io/api_v2/message/send",
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 => "sender_id=OBLIGR&message=THIS%20IS%20A%20TEST%20MESSAGE&mobile_no=8225838383&unicode=0", CURLOPT_HTTPHEADER => array( "Authorization: Bearer [YOUR_API_KEY]", "Content-Type: application/x-www-form-urlencoded", "Cookie: [COOKIES]" ), )); $response = curl_exec($curl); curl_close($curl); echo $response; '
https://obligr.io/api_v2/message/send?api_key=[YOUR_API_KEY]&sender_id=OBLIGR&message=THIS IS A TEST MESSAGE&mobile_no=8225838383&unicode =0
var client = new RestClient("https://obligr.io/api_v2/message/send");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer [YOUR_API_KEY]");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddHeader("Cookie", "[COOKIES]");
request.AddParameter("sender_id", "OBLIGR");
request.AddParameter("message", "THIS IS A TEST MESSAGE");
request.AddParameter("mobile_no", "8225838383");
request.AddParameter("unicode", "0");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
import http.client
import mimetypes
conn = http.client.HTTPSConnection("[YOUR_API_KEY]")
payload = 'sender_id=OBLIGR&message=THIS%20IS%20A%20TEST%20MESSAGE&mobile_no=8225838383&unicode%20=0'
headers = {
'Authorization': 'Bearer [YOUR_API_KEY]',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '[COOKIES]'
}
conn.request("POST", "/api_v2/message/send", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "sender_id=OBLIGR&message=THIS IS A TEST MESSAGE&mobile_no=8225838383&unicode =0");
Request request = new Request.Builder()
.url("https://obligr.io/api_v2/message/send")
.method("POST", body)
.addHeader("Authorization", "Bearer U[YOUR_API_KEY]")
.addHeader("Content-Type", "application/x-www-form-urlencoded")
.addHeader("Cookie", "[COOKIES]")
.build();
Response response = client.newCall(request).execute();
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'sender_id': 'OBLIGR',
'message': 'THIS IS A TEST MESSAGE',
'mobile_no': '8225838383',
'unicode ': '0'
});
var config = {
method: 'post',
url: 'https://obligr.io/api_v2/message/send',
headers: {
'Authorization': '[YOUR_API_KEY]',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '[COOKIES]'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
var settings = {
"url": "https://obligr.io/api_v2/message/send",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer obligr.io",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "[COOKIES]"
},
"data": {
"sender_id": "OBLIGR",
"message": "THIS IS A TEST MESSAGE",
"mobile_no": "8225838383",
"unicode ": "0"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});