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 } }
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
|
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." }
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
|
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." }
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
|
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." }