|
Key
|
Value
|
Description
|
|---|---|---|
|
date_from (string)
|
2020-07-29 00:00:00
|
REQUIRED Y-m-d h:i:s Format
|
|
date_to
|
2020-07-29 23:59:59
|
REQUIRED Y-m-d h:i:s Format
|
|
sender_id (string)
|
OBLIGR
|
|
|
message (string)
|
THIS IS A TEST MESSAGE
|
|
|
job_id (number)
|
2984201
|
Note : if search by "job_id" then no need to enter date_from or date_to.
|
curl --location --request POST 'https://obligr.io/api_v2/message/report' \ --header 'Authorization: Bearer [YOUR_API_KEY]' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Cookie: [COOKIES]' \ --data-urlencode 'job_id=2984201'
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://obligr.io/api_v2/message/report",
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 => "job_id=2984201", 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/report?api_key=[YOUR_API_KEY]&date_from=2020-07-29 00:00:00&date_to=2020-07-29 23:59:59&sender_id=OBLIGR&message=THIS IS A TEST MESSAGE&job_id=2984201
"campaign_id": 2984201,
var client = new RestClient("https://obligr.io/api_v2/message/report");
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("job_id", "2984201");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
import http.client
import mimetypes
conn = http.client.HTTPSConnection("obligr.io")
payload = 'date_from=2020-07-29%2000%3A00%3A00&date_to=2020-07-29%2023%3A59%3A59&sender_id=OBLIGR&message=THIS%20IS%20A%20TEST%20MESSAGE&job_id=2984201'
headers = {
'Authorization': 'Bearer [YOUR_API_KEY]',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '[COOKIES]'
}
conn.request("POST", "/api_v2/message/report", 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, "date_from=2020-07-29 00:00:00&date_to=2020-07-29 23:59:59&sender_id=OBLIGR&message=THIS IS A TEST MESSAGE&job_id=2984201");
Request request = new Request.Builder()
.url("https://obligr.io/api_v2/message/report")
.method("POST", body)
.addHeader("Authorization", "Bearer [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({
'date_from': '2020-07-29 00:00:00',
'date_to': '2020-07-29 23:59:59',
'sender_id': 'OBLIGR',
'message': 'THIS IS A TEST MESSAGE',
'job_id': '2984201'
});
var config = {
method: 'post',
url: 'https://obligr.io/api_v2/message/report',
headers: {
'Authorization': 'Bearer [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/report",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer [YOUR_API_KEY]",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "[COOKIES]"
},
"data": {
"date_from": "2020-07-29 00:00:00",
"date_to": "2020-07-29 23:59:59",
"sender_id": "OBLIGR",
"message": "THIS IS A TEST MESSAGE",
"job_id": "2984201"
}
};
$.ajax(settings).done(function (response) {
console.log(response);
});
{
“success”: true,
“error”: null,
“data”: [
{
“job_id”: 2984201,
“sender_id”: “OBLIGR”,
“total_number”: 1,
“total_messages”: 1,
“message”: “THIS IS A TEST MESSAGE”,
“date_submitted”: “2020-07-29 18:30:05”,
“unicode”: “”,
“status”: “Completed”,
“send_by”: “api”,
“parent_job_id”: null,
“re_schedule_time”: 0,
“re_schedule_status”: null
}]}