|
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
|
|
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
|
curl --location --request POST 'https://obligr.io/api_v2/tfa/send' \ --header 'Authorization: Bearer [YOUR_API_KEY]' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Cookie: [COOKIES]' \ --data-urlencode 'mobile_no=8225838383' \ --data-urlencode 'type=sms' \ --data-urlencode 'sender_id=DEMOOO' \ --data-urlencode 'caller_id=8225838383' \ --data-urlencode 'voice_name=Raveena' \ --data-urlencode 'message=Your OTP Verification Code is : ##OTP##' \ --data-urlencode 'expire_time=180' \ --data-urlencode 'otp_length=6' \ --data-urlencode 'is_unicode=0'
<?php $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://obligr.io/api_v2/tfa/send",<br ?--> 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 => "mobile_no=8225838383&type=sms&sender_id=DEMOOO&caller_id=8225838383&voice_name=Raveena&message=Your%20OTP%20Verification%20Code%20is%20%3A%20%23%23OTP%23%23&expire_time=180&otp_length=6&is_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://demo.obligr.com/api_v2/tfa/send?api_key=[YOUR_API_KEY]&mobile_no=8225838383&type=sms&sender_id=DEMOOO&caller_id=8225838383&voice_name=Raveena&message=Your OTP Verification Code is : %23%23OTP%23%23&expire_time=180&otp_length=6&is_unicode=0
var client = new RestClient("https://obligr.io/api_v2/tfa/send");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "
[YOUR_API_KEY]");
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddHeader("Cookie", "[COOKIES]");
request.AddParameter("mobile_no", "8225838383");
request.AddParameter("type", "sms");
request.AddParameter("sender_id", "DEMOOO");
request.AddParameter("caller_id", "8225838383");
request.AddParameter("voice_name", "Raveena");
request.AddParameter("message", "Your OTP Verification Code is : ##OTP##");
request.AddParameter("expire_time", "180");
request.AddParameter("otp_length", "6");
request.AddParameter("is_unicode", "0");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content)
import http.client
import mimetypes
conn = http.client.HTTPSConnection("obligr.io")
payload = 'mobile_no=8225838383&type=sms&sender_id=DEMOOO&caller_id=8225838383&voice_name=Raveena&message=Your%20OTP%20Verification%20Code%20is%20%3A%20%23%23OTP%23%23&expire_time=180&otp_length=6&is_unicode=0'
headers = {
'Authorization': 'Bearer [YOUR_API_KEY]',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '[COOKIES]'
}
conn.request("POST", "/api_v2/tfa/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, "mobile_no=8225838383&type=sms&sender_id=DEMOOO&caller_id=8225838383&voice_name=Raveena&message=Your OTP Verification Code is : ##OTP##&expire_time=180&otp_length=6&is_unicode=0");
Request request = new Request.Builder()
.url("https://obligr.io/api_v2/tfa/send")
.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 unirest = require('unirest');
var req = unirest('POST', 'https://obligr.io/api_v2/tfa/send')
.headers({
'Authorization': 'Bearer [YOUR_API_KEY]',
'Content-Type': 'application/x-www-form-urlencoded',
'Cookie': '[COOKIES]'
})
.send('mobile_no=8225838383')
.send('type=sms')
.send('sender_id=DEMOOO')
.send('caller_id=8225838383')
.send('voice_name=Raveena')
.send('message=Your OTP Verification Code is : ##OTP##')
.send('expire_time=180')
.send('otp_length=6')
.send('is_unicode=0')
.end(function (res) {
if (res.error) throw new Error(res.error);
console.log(res.raw_body);
});
var settings = {
"url": "https://obligr.io/api_v2/tfa/send",
"method": "POST",
"timeout": 0,
"headers": {
"Authorization": "Bearer [YOUR_API_KEY]",
"Content-Type": "application/x-www-form-urlencoded",
"Cookie": "[COOKIES]"
},
"data": {
"mobile_no": "8225838383",
"type": "sms",
"sender_id": "DEMOOO",
"caller_id": "8225838383",
"voice_name": "Raveena",
"message": "Your OTP Verification Code is : ##OTP##",
"expire_time": "180",
"otp_length": "6",
"is_unicode": "0"
}
};