Overview and parameters

HTTP based API will be used in OTP API through TeleOSS.

Parameters Detail:

Parameter Value (Sample) Required Description
apikey 54XXXXXXXXXXXXX Mandatory Assigned API key of user. This key user can get from portal by logging into the system.
mobileNo 8745xx6587 Mandatory Mobile number on which message will be delivered.
system-type teleoss_system Optional Assigned system type of OTP system. The system type can be obtained from portal by logging into the system.

Request reference

Request

GET https://{Domain}/client/api/otp/send/{apikey}/{mobileno}/{system type}

Code examples

Code example
curl --location --request GET 'https://{Domain}/client/api/otp/send/{apikey}/{mobileno}/{system type}'
const url = "https://{Domain}/client/api/otp/send/{apikey}/{mobileno}/{system type}";
const options = {
  method: "GET"
};

const response = await fetch(url, options);
const data = await response.json();
console.log(data);
import requests

url = "https://{Domain}/client/api/otp/send/{apikey}/{mobileno}/{system type}"
headers = {}

response = requests.request(
    "GET",
    url,
    headers=headers
)
print(response.json())
<?php
$curl = curl_init();

curl_setopt_array($curl, [
    CURLOPT_URL => "https://{Domain}/client/api/otp/send/{apikey}/{mobileno}/{system type}",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => "GET"
]);

$response = curl_exec($curl);
curl_close($curl);
echo $response;

Request body

JSON body
{
"api-key":"f0xxxxxxxxxa6",
"mobile-no":"9852xx2542",
"otp-system-type":"IxxC"
}

Response example

JSON response
{
"mobile-no": "+91985xxxx521",
"status": {
"error-code": "000",
"error-status": "Success",
"error-description": "OTP generate successfully"
}
}