Introduction

API Reference - v2.0

Your API Key is : [YOUR_API_KEY]

For Generate / Re-Generate API Key goto to Dashboard/My Account

Authentication
POST Method : authorization: Bearer [YOUR_API_KEY] (in header)
GET Method : ?api_key=[https://obligr.io/api_v2/user/balance] (in QueryString url)

Edit
Edit
  • https://obligr.io/api_v2/user/balance
curl -X POST \
    https://obligr.io/api_v2/user/balance \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' 
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/balance",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "sms_credit": 843813,
        "voice_credit": 311727
    }
}
Edit

BODY PARAMS

Key
Value
Description
company_name (string)
alexander
REQUIRED
attn (string)
REQUIRED
address (string)
REQUIRED
pincode (number)
REQUIRED - 6 DIGIT
city (string)
REQUIRED
state (string)
REQUIRED
country (string)
India
REQUIRED
gst_code (number)
REQUIRED - 2 DIGIT
pan_number (string)
REQUIRED - 10 Characters
  • https://obligr.io/api_v2/user/billing_address
curl -X POST \
    https://obligr.io/api_v2/user/billing_address \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'company_name=XXXX&attn=XXXX'
<?php

                                                            $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/billing_address",
  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(
                            'company_name' => 'XXXX',
                            'attn' => 'XXXX',
                            'address' => 'XXXX',
                            'pincode' => '000000',
                            'city' => 'XXXX',
                            'state' => 'XXXX',
                            'country' => 'India',
                            'gst_number' => 'XXXX',
                            'gst_code' => '00',
                            'pan_number' => 'XXXX'
                            ),
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer [YOUR_API_KEY]",
    "Content-Type: application/json"
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "Billing Address Successfully Saved."
}
Edit

BODY PARAMS

Key
Value
Description
name (string)
REQUIRED
username (string) Only characters or number, not space or special characters
REQUIRED
email (string)
REQUIRED
mobile_no (number) 10 Digit only
REQUIRED
  • https://obligr.io/api_v2/user/credit
curl -X POST \
    https://obligr.io/api_v2/user/signup \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=9876543210'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/signup",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=98765XXXX",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "User `alexander` created success. Password sent on email or mobile."
}
Edit

BODY PARAMS

Key
Value
Description
username (string)
alexander
REQUIRED
credit_type (string)
sms
REQUIRED sms , voice
credit (number)
2000
REQUIRED
service_type (string)
Transactional
REQUIRED Transactional,Promotional,open_dnd,voice_call
price_per_credit (number)
0.20
REQUIRED
  • https://obligr.io/api_v2/user/credit
curl -X POST \
    https://obligr.io/api_v2/user/credit \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'alexander&credit_type=sms&credit=2000&service_type=Transactional&price_per_credit=0.50'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => "https://obligr.io/api_v2/user/credit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "alexander&credit_type=sms&credit=2000&service_type=Transactional&price_per_credit=0.50",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer [YOUR_API_KEY]",
"cache-control: no-cache",
"content-type: application/json"
),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
    "success": true,
    "error": null,
    "data": "User `alexander` created success. Password sent on email or mobile."
}
Edit
no content added yet
Edit
no content added yet
Edit
no content added yet
Edit
no content added yet

Check Available Balance

  • https://obligr.io/api_v2/user/balance
curl -X POST \
    https://obligr.io/api_v2/user/balance \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' 
<?php
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/balance",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "sms_credit": 843813,
        "voice_credit": 311727
    }
}

Billing Address

BODY PARAMS

Key

Value

Description

company_name

(string)

alexander

REQUIRED

attn

(string)

REQUIRED

address

(string)

REQUIRED

pincode

(number)

REQUIRED

6 DIGIT

city

(string)

REQUIRED

state

(string)

REQUIRED

country

(string)

India

REQUIRED

country

(string)

India

REQUIRED

gst_code

(number)

REQUIRED

2 DIGIT

pan_number

(string)

REQUIRED

10 Characters

  • https://obligr.io/api_v2/user/billing_address
curl -X POST \
    https://obligr.io/api_v2/user/billing_address \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'company_name=XXXX&attn=XXXX'
<?php

                                                            $curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/billing_address",
  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(
                            'company_name' => 'XXXX',
                            'attn' => 'XXXX',
                            'address' => 'XXXX',
                            'pincode' => '000000',
                            'city' => 'XXXX',
                            'state' => 'XXXX',
                            'country' => 'India',
                            'gst_number' => 'XXXX',
                            'gst_code' => '00',
                            'pan_number' => 'XXXX'
                            ),
  CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer [YOUR_API_KEY]",
    "Content-Type: application/json"
  ),
));
$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "Billing Address Successfully Saved."
}

User Signup

BODY PARAMS

Key

Value

Description

name

(string)

REQUIRED

username

(string) Only characters or number, not space or special characters

REQUIRED

email

(string)

REQUIRED

mobile_no

(number) 10 Digit only

REQUIRED

  • https://obligr.io/api_v2/user/credit
curl -X POST \
    https://obligr.io/api_v2/user/signup \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=9876543210'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/signup",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "name=Alexander&username=alexander&email=alexander%40example.com&mobile_no=98765XXXX",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "User `alexander` created success. Password sent on email or mobile."
}

User Credit

BODY PARAMS

Key

Value

Description

username

(string)

alexander

REQUIRED

credit_type

(string)

sms

REQUIRED

sms , voice

credit

(number)

2000

REQUIRED

service_type

(string)

Transactional

REQUIRED

Transactional,Promotional,open_dnd,voice_call

price_per_credit

(number)

0.20

REQUIRED

  • https://obligr.io/api_v2/user/credit
curl -X POST \
    https://obligr.io/api_v2/user/credit \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'alexander&credit_type=sms&credit=2000&service_type=Transactional&price_per_credit=0.50'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/credit",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "alexander&credit_type=sms&credit=2000&service_type=Transactional&price_per_credit=0.50",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "User `alexander` created success. Password sent on email or mobile."
}

User List

  • https://obligr.io/api_v2/user/list
curl -X POST \
    https://obligr.io/api_v2/user/list \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/list",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "username": "alexander",
            "name": "Alexander",
            "email": "[email protected]",
            "mobile": "934*******",
            "status": "active",
            "type": "Reseller",
            "sms_credit": 100000,
            "voice_credit": 50000
        },
        {
            "username": "john",
            "name": "Mr John",
            "email": "[email protected]",
            "mobile": "******2303",
            "status": "active",
            "type": "Reseller",
            "sms_credit": 8000,
            "voice_credit": 1000
        },
    ]
}

User Detail

BODY PARAMS

Key

Value

Description

username

(string)

alexander

REQUIRED

  • https://obligr.io/api_v2/user/detail
curl -X POST \
    https://obligr.io/api_v2/user/detail \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'username=alexander'
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "username=alexander",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
            "username": "alexander",
            "name": "Alexander",
            "email": "[email protected]",
            "mobile": "934*******",
            "status": "active",
            "type": "Reseller",
            "sms_credit": 100000,
            "voice_credit": 50000
        }
}

Filter Mobile Number

BODY PARAMS

Key

Value

Description

mobile_number

(string)

078945XXXX,987654XXXX,onetwothree

REQUIRED

  • https://obligr.io/api_v2/contact/filter_number

https://obligr.io/api_v2/contact/filter_number?api_key=[YOUR_API_KEY]&mobile_number=0789456123,9876543210,onetwothree

curl -X POST \
    https://obligr.io/api_v2/contact/filter_number \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json'
  -d 'mobile_number=078945XXXX,987654XXXX,onetwothree'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/contact/filter_number",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "mobile_number=0789456123,9876543210,onetwothree",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
   "success":true,
   "error":null,
   "data":{
      "valid_number":[
         "0789456123",
         "987654XXXX"
      ],
      "invalid_number":[
         "onetwothree"
      ],
      "duplicate_number":[]
   }
}

Message Count

BODY PARAMS

Key

Value

Description

message

(string)

REQUIRED

unicode

(boolean)

0

1 or 0

  • https://obligr.io/api_v2/message/count

https://obligr.io/api_v2/message/count?api_key=[YOUR_API_KEY]&message=YOUR_MESSAGE&unicode=0

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/message/count",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "message=YOUR_MESSAGE&unicode=0",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "msg_length": 30,
        "msg_count": 1,
        "unicode": false
    }
}

Send Message

BODY PARAMS

Key

Value

Description

sender_id

(string)

BLKSMS

REQUIRED

6 Character.

message

(string)

REQUIRED

mobile_no

(string)

98765XXXX,98766XXXX

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

country_coded

(string)

eg.IN (default)

Select country if you want to send International SMS(Outside India).

Message Count
+267 - Botswana (+267)
+86 - China (+86)
+49 - Germany (Germany) (+49)
+30 - Greece (Greece) (+30)
+62 - Indonesia (Indonesia) (+62)
+964 - Iraq (+964)
+39 - Italy (+39)
+60 - Malaysia (Malaysia) (+60)
+960 - Maldives (Maldives) (+960)
+230 - Mauritius (Mauritius) (+230)
+52 - Mexico (Mexico) (+52)
+95 - Myanmar (Myanmar) (+95)
+977 - Nepal (Nepal) (+977)
+64 - New Zealand (New Zealand) (+64)
+234 - Nigeria (Nigeria) (+234)
+968 - Oman (Oman (+968)
+63 - Philippines (Philippines) (+63)
+7 - Russian Federation (Russian Federation) (+7)
+65 - Singapore (Singapore) (+65)
+66 - Thailand (+66)
+971 - United Arab Emirates (United Arab Emirates) (+971)
+44 - United Kingdom (United Kingdom) (+44)
+1 - United States (+1)

  • https://obligr.io/api_v2/message/send
curl -X POST \
    https://obligr.io/api_v2/message/send \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'sender_id=BLKSMS&mobile_no=987654XXXX%2C987456321&message=YOUR_MESSAGE'
<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 => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "sender_id=BLKSMS&message=YOUR_MESSAGE&mobile_no=987654XXXX%2C9874563211",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "campaign_id": 101,
        "total_credit": 2,
        "total_number": 2,
        "unicode": true,
        "message": "SMS successfully sent"
    }
}

Message Delivery Report

BODY PARAMS

Key

Value

Description

date_from

(string)

2020-05-20 00:00:00

REQUIRED

Y-m-d h:i:s Format

date_to

(string)

2020-05-20 23:59:59

REQUIRED

Y-m-d h:i:s Format

sender_id

(string)

BLKSMS

message

(string)

job_id

(number)

Noteif search by "job_id" then no need to enter date_from or date_to.

  • https://obligr.io/api_v2/message/report

https://obligr.io/api_v2/message/report?api_key=[YOUR_API_KEY]&date_from=2020-05-20+00%3A00%3A00&date_to=2020-05-20+23%3A59%3A59

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/user/detail",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "username=alexander",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "job_id": 61,
            "sender_id": "DEMOOO",
            "total_number": 1,
            "total_messages": 1,
            "message": "Hello alexander\nYour Sender ID : DDDDDD is Approved.\nThank you",
            "date_submitted": "2019-07-16 09:10:04",
            "unicode": "",
            "status": "Completed",
            "send_by": "api",
            "parent_job_id": null,
            "re_schedule_time": 0,
            "re_schedule_status": null
        },
        {
            "job_id": 60,
            "sender_id": "DEMOOO",
            "total_number": 1,
            "total_messages": 1,
            "message": "User SMS alexander\nAccount Has been Credited with 50 Voice Call.",
            "date_submitted": "2019-07-16 09:09:16",
            "unicode": "",
            "status": "Completed",
            "send_by": "api",
            "parent_job_id": null,
            "re_schedule_time": 0,
            "re_schedule_status": null
        },
    ]
}

Message Delivery Report Details

  • https://obligr.io/api_v2/message/report_details/[JOB_ID]

https://obligr.io/api_v2/message/report_details/[JOB_ID]?api_key=[YOUR_API_KEY]

<php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/message/report_details/[JOB_ID]",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "mobile_no": "987654XXXX",
            "status": "DELIVRD",
            "message_id": "2573672459900803-3a5df00a"
        },
        {
            "mobile_no": "987654XXXX",
            "status": "UNDELIV",
            "message_id": "2573672464236866-5efc25fb"
        }
    ]
}

Message / List Sender ID

  • https://obligr.io/api_v2/message/sender_id
curl -X POST \
    https://obligr.io/api_v2/message/sender_id \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
<php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/message/sender_id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "name": "DEMOOO",
            "status": "Active",
            "is_default": 1,
            "date_created": "2018-10-14 00:00:00"
        },
        {
            "name": "AAABBB",
            "status": "Active",
            "is_default": 0,
            "date_created": "2018-10-14 00:00:00"
        },
}

Message / Add Sender ID

BODY PARAMS

Key

Value

Description

sender_id

(string)

BLKSMS

REQUIRED

6 Character.

message

(string)

REQUIRED

sample message

  • https://obligr.io/api_v2/message/add_sender_id
curl -X POST \
    https://obligr.io/api_v2/message/add_sender_id \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d 'sender_id=BLKSMS&message=YOUR_MESSAGE'
<php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/message/add_sender_id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "sender_id=BLKSMS&message=YOUR_MESSAGE",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "sender_id": "BLKSMS",
        "status": "pending"
    }
}

Message / Delete Sender ID

  • https://obligr.io/api_v2/message/delete_sender_id/{sender_id}
curl -X POST \
    https://obligr.io/api_v2/message/delete_sender_id/{sender_id} \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/message/delete_sender_id/{sender_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": "Sender ID BLKSMS Successfully Deleted."
}

Send Voice Call

BODY PARAMS

Key

Value

Description

caller_id

(number)

888888XXXX

REQUIRED

10 Digit mobile number.

voice_source

(string)

voice_file

Optional

voice_file or voice_text

voice_file

(string)

REQUIRED IF use voice_source is voice_file

file name or file_url
only .wav,.mp3 file

voice_text

(string)

REQUIRED IF use voice_source is voice_text

voice_pitch_rate

(string)

medium

Optional

slow,medium,fast

voice_name

(string)

medium

REQUIRED IF use voice_source is voice_text

Voice Names

Voice Name

Salli
Joey
Aditi
Raveena

Language - Gender

en-US – Female
en-US – Male
hi-IN – Female – 1
hi-IN – Hindi Text Accepted

mobile_no

(string)

987654XXXX,987665XXXX

REQUIRED

comma separate multiple mobile no

posting_time

(datetime)

2020-05-22 15:40:22

User posting_time for Schedule Voice Call.
Format : 'Y-m-d H:i:s'

is_conversation

(integer)

(integer) 1 OR 0

Track call response after call press by user.

re_schedule_time

(integer)

Default 0

Number of time auto Reschedule

re_schedule_status

(string)

Answered,NoAnswer,Failed,Busy,RING_TIMEOUT,Rejected,Completed

voice_interval

(integer)

Reschedule Time Interval (In Minutes).

country_code

(string)

eg.IN (default)

Select country if you want to sent International Call(Outside India).

+267 - Botswana (+267)
+86 - China (+86)
+49 - Germany (Germany) (+49)
+30 - Greece (Greece) (+30)
+62 - Indonesia (Indonesia) (+62)
+964 - Iraq (+964)
+39 - Italy (+39)
+60 - Malaysia (Malaysia) (+60)
+960 - Maldives (Maldives) (+960)
+230 - Mauritius (Mauritius) (+230)
+52 - Mexico (Mexico) (+52)
+95 - Myanmar (Myanmar) (+95)
+977 - Nepal (Nepal) (+977)
+64 - New Zealand (New Zealand) (+64)
+234 - Nigeria (Nigeria) (+234)
+968 - Oman (Oman (+968)
+63 - Philippines (Philippines) (+63)
+7 - Russian Federation (Russian Federation) (+7)
+65 - Singapore (Singapore) (+65)
+66 - Thailand (+66)
+971 - United Arab Emirates (United Arab Emirates) (+971)
+44 - United Kingdom (United Kingdom) (+44)
+1 - United States (+1)

  • https://obligr.io/api_v2/voice-call/campaign

https://obligr.io/api_v2/voice-call/campaign?api_key=[YOUR_API_KEY]&caller_id=8888888888&voice_file=2018032510455421853753553.wav&mobile=9876543210

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/campaign",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "caller_id=888888XXXX&voice_file=2018032510455421853753553.wav&mobile=987654XXXX",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "campaign_id": 763,
        "total_call": 1,
        "total_number": 1,
        "message": "Call successfully sent."
    }
}

Caller ID : Add

BODY PARAMS

Key

Value

Description

sender_id

(string)

Rajesh Kumar

Name or title for Caller ID

mobile_no

(number)

REQUIRED

10 digit mobile number

  • https://obligr.io/api_v2/voice-call/add_caller_id
curl -X POST \
    https://obligr.io/api_v2/voice-call/add_caller_id \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d title=Mr%20Kumar
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/add_caller_id",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "title=Mr%20Kumar",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/json",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "mobile_no": "987654XXXX",
        "title": "Mr Kumar",
        "status": "pending"
    }
}

Caller ID : Verify

  • https://obligr.io/api_v2/voice-call/verify_caller_id/{mobile_no}

https://obligr.io/api_v2/voice-call/add_caller_id

curl -X POST \
    https://obligr.io/api_v2/voice-call/verify_caller_id/9876543210 \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
  -d verify_otp=9876543
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/verify_caller_id/987654XXXX",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "verify_otp=9876543",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "mobile_no": "987654XXXX",
        "title": "Mr Kumar",
        "status": "active"
    }
}

Caller ID : Delete

  • https://obligr.io/api_v2/voice-call/delete_caller_id/{mobile_no}
curl -X POST \
    https://obligr.io/api_v2/voice-call/delete_caller_id/9876543210 \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/delete_caller_id/987654XXXX",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": "Caller ID 987654XXXX Successfully Deleted.",
    "data": null
}

Voice Call : Report

BODY PARAMS

Key

Value

Description

date_from

(string)

2020-05-22 00:00:00

REQUIRED

Y-m-d h:i:s Format

date_to

(string)

2020-05-22 23:59:59

REQUIRED

Y-m-d h:i:s Format

campaign_id

(number)

2020-05-22 23:59:59

Note : if search by "campaign_id" then no need to enter date_from or date_to.

campaign_id

answered: The destination has answered the call
rejected: The call attempt was rejected by the destination
busy: The destination is on the line with another caller
unanswered: The call was canceled by the caller
timeout: The call timed out before it was answered
failed: The call failed before reaching the destination
completed: The call is completed successfully

  • https://obligr.io/api_v2/voice-call/report
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/report",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "date_from=2017-05-14%2000%3A00%3A00&date_to=2018-05-15%2023%3A59%3A59",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "campaign_id": 43232,
            "total_call": 1,
            "total_number": 1,
            "date_submitted": "2019-08-17 17:46:16",
            "duration": 29,
            "status": "completed",
            "parent_campaign_id": null,
            "voice_source": "voice_text",
            "voice_file": null,
            "voice_name": "Salli",
            "voice_text": "Hello this is test sms Press 1 have you interest and ",
            "voice_pitch_rate": "slow",
            "is_conversation": 1,
            "re_schedule_time": 0,
            "voice_interval": "0",
            "conversation_resp": {
                "1": "Thanks you chousing us"
            },
            "summary": {
                "failed": "1"
            },
            "call_response_summary": {
                "0": 1,
                "1": 0,
                "2": 0,
                "3": 0,
                "4": 0,
                "5": 0,
                "6": 0,
                "7": 0,
                "8": 0,
                "9": 0,
                "NA": 0
            }
        }
    ]
}

Voice Call : Campaign Details

  • https://obligr.io/api_v2/voice-call/details/{campaign_id}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/details/{campaign_id}",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": [
        {
            "mobile_no": "+91746400XXXX",
            "status": "Answered",
            "duration": 27,
            "call_start": "2018-05-13 12:57:32",
            "call_end": "2018-05-13 12:57:59"
        },
        {
            "mobile_no": "+91746400XXXX",
            "status": "Answered",
            "duration": 9,
            "call_start": "2018-05-13 12:57:26",
            "call_end": "2018-05-13 12:57:35"
        }
    ]
}

Voice Call: Delete Scheduled

  • https://obligr.io/api_v2/voice-call/delete_scheduled/{campaign_id}
curl -X POST \
    https://obligr.io/api_v2/voice-call/delete_caller_id/10001 \
  -H 'authorization: Bearer [YOUR_API_KEY]' \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/x-www-form-urlencoded' \
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/voice-call/delete_caller_id/10001",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": "Campaign 10001 Successfully Deleted.",
    "data": null
}

Voice Call: Voice File Upload

BODY PARAMS

Key

Value

Description

voice_title

(string)

voice_title

(string)

REQUIRED

voice_file URL or form_data file

  • https://obligr.io/api_v2/voice-call/voice_file_upload

https://obligr.io/api_v2/voice-call/voice_file_upload?api_key=[YOUR_API_KEY]&voice_file=[VOICE_FILE_URL]

<?php
if(isset($_POST['title']) && isset($_FILES['fileToUpload'])){
    $cFile = '';
    if (function_exists('curl_file_create')) {
        $cFile =  curl_file_create($_FILES['fileToUpload']['tmp_name'], $_FILES['fileToUpload']['type'], $_FILES['fileToUpload']['name']);
    }

    $curl = curl_init();


    $post = array('title' => $_POST['title'],'voice_file'=> $cFile);

curl_setopt_array
($curl, array( CURLOPT_URL => "https://obligr.io/api_v2/voice-call/voice_file_upload",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_POST => true,
        CURLOPT_POSTFIELDS => $post,
        CURLOPT_HTTPHEADER => array(
            "Authorization: Bearer [YOUR_API_KEY]",
        ),
    ));
    $response = curl_exec($curl);
    $err = curl_error($curl);
    curl_close($curl);
    if ($err) {
        echo "cURL Error #:" . $err;
    } else {
        echo $response;
    }
    die;
}
?>
                                                            


<form action="" method="post" enctype="multipart/form-data">
    Title :
    <input type="text" name="title" id="title">
    

Select Audio File : <input type="file" name="fileToUpload" id="fileToUpload">

<input type="submit" value="Upload" name="submit">
{
    "success": true,
    "error": null,
    "data": {
        "title": "2019062518304610710710634525 2019-06-27 08:57:58 (16 sec  : 1 Credit)",
        "voice_file": "2019062708575821723791840.wav",
        "duration": 16
    }
}

Voice Call: Voice File List

  • https://obligr.io/api_v2/voice-call/voice_file

https://obligr.io/api_v2/voice-call/voice_file?api_key=[YOUR_API_KEY]

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://demo.obligr.com/api_v2/voice-call/voice_file",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded",
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
    }
}

Two Factor Authentication - Send

Two Factor Authentication process - it should be a single service with different option

BODY PARAMS

Key

Value

Description

mobile_no

(number)

REQUIRED

10 Digit mobile number.

type

(string)

sms

Optional

sms,voice_call,both
Default is : sms
if select 'both' then otp verification goes to sms as well voice call.

sender_id

(string)

BLKSMS

Optional

Usee in Type is sms/both.
Select from your active sender ID.

caller_id

(string)

REQUIRED IF use type is voice_call/both

10 Digit Mobile number.
Select from your active Caller ID.

voice_name

(string)

sms

REQUIRED IF use type is voice_call/both

Voice Names

Voice Name

Salli
Joey
Aditi
Raveena

Language - Gender

en-US – Female
en-US – Male
hi-IN – Female – 1
hi-IN – Hindi Text Accepted

message

(string)

Your OTP Verification Code is : ##OTP##

optional

Type your custom message.put OTP code replace placeholder : ##OTP##.
Default is : Your OTP Verification Code is : ##OTP##
Here ##OTP## is replace with auto generate OTP .

expire_time

(number)

180

Optional

Give value in minutes
Default is : 180 (for 3 hours)

otp_length

(number)

6

Optional

length of OTP number in (DIGIT)
Default is : 6 Digit
Min Value is : 4 , Max Value is : 12

is_unicode

(int)

0

Optional

1 or 0

  • https://obligr.io/api_v2/tfa/send

https://obligr.io/api_v2/tfa/send?api_key=[YOUR_API_KEY]&mobile_no=[YOUR_MOBILE_NUMBER]

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/tfa/send",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "mobile_no=[YOUR_MOBILE_NUMBER]",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "verify_key": 'bkgka82d27ew',
        "mobile_no": '987654XXXX',
        "message": "OTP successfully sent."
    }
}

Two Factor Authentication - Re Send

BODY PARAMS

Key

Value

Description

mobile_no

(number)

REQUIRED

10 digit mobile number

verify_key

(string)

REQUIRED

  • https://obligr.io/api_v2/tfa/resend

https://obligr.io/api_v2/tfa/resend?api_key=[YOUR_API_KEY]&mobile_no=[YOUR_MOBILE_NUMBER]&verify_key=[YOUR_VERIFY_KEY]

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/tfa/resend",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "mobile_no=[YOUR_MOBILE_NUMBER]&verify_key=[YOUR_VERIFY_KEY]",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "verify_key": 'bkgka82d27ew',
        "mobile_no": '987654XXXX',
        "message": "OTP successfully Resent."
    }
}

Two Factor Authentication - Verify

BODY PARAMS

Key

Value

Description

mobile_no

(number)

REQUIRED

10 digit mobile number

verify_key

(string)

REQUIRED

otp

(string)

REQUIRED

Your 6 Digit OTP Code.

  • https://obligr.io/api_v2/tfa/verify

https://obligr.io/api_v2/tfa/verify?api_key=[YOUR_API_KEY]&mobile_no=[YOUR_MOBILE_NUMBER]&verify_key=[YOUR_VERIFY_KEY]&otp=[YOUR_OTP_CODE]

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://obligr.io/api_v2/tfa/verify",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "mobile_no=[YOUR_MOBILE_NUMBER]&verify_key=[YOUR_VERIFY_KEY]&otp=[YOUR_OTP_CODE]",
  CURLOPT_HTTPHEADER => array(
    "authorization: Bearer [YOUR_API_KEY]",
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
    "success": true,
    "error": null,
    "data": {
        "mobile_no": '987654XXXX',
        "message": "OTP successfully Verified."
    }
}